/**
 * Frontend CSS pre Listeo Interné Termíny
 */

/* Dashboard navigácia */
.user-menu a[href*="interne-terminy"] i,
.dashboard-nav a[href*="interne-terminy"] i {
    color: #f91942;
}

/* Interné termíny stránka */
.lit-internal-slots-info {
    padding: 20px;
    background: #f7f7f7;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 4px solid #f91942;
}

.lit-interne-terminy .dashboard-list-box-static {
    position: relative;
}


/* Checkbox pre interné sloty */
.internal-slot-checkbox {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    z-index: 10;
}

.internal-slot-checkbox label {
    display: inline-block;
    margin-left: 3px;
    color: #ff9800;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    font-weight: normal;
}

.internal-slot-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
    transform: scale(0.8);
    -webkit-transform: scale(0.8);
}

/* Označenie interných slotov */
.single-slot.internal-slot {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.single-slot.internal-slot .single-slot-time {
    font-weight: 600;
}

/* Badge pre interné termíny */
.internal-badge {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Form helper overrides */
#lit-new-internal-form select,
#lit-new-internal-form input,
#lit-new-internal-form textarea {
    color: #333;
}

#lit-new-internal-form .chosen-container {
    width: 100% !important;
}

#lit-new-internal-form .chosen-container-single .chosen-single,
#lit-new-internal-form .chosen-container-single .chosen-single span {
    color: #333;
}

#lit-new-internal-form .error {
    border-color: #f44336 !important;
}

/* Tabuľka s termínmi */
.manage-table.responsive-table {
    margin-top: 20px;
    width: 100%;
    table-layout: auto;
}

.manage-table.responsive-table th {
    background: #f7f7f7;
    font-weight: 600;
    padding: 14px 16px;
}

.manage-table.responsive-table td {
    vertical-align: middle;
    padding: 12px 16px;
}

.lit-interne-terminy #lit-appointments-list {
    width: 100%;
}

.lit-interne-terminy .manage-table.responsive-table tr td:first-child,
.lit-interne-terminy .manage-table.responsive-table tr th:first-child {
    width: 20%;
}

.lit-interne-terminy .manage-table.responsive-table tr td:nth-child(4) {
    width: 28%;
}

.lit-interne-terminy .manage-table.responsive-table tr td:last-child,
.lit-interne-terminy .manage-table.responsive-table tr th:last-child {
    width: 120px;
    text-align: right;
}

.lit-interne-terminy .manage-table.responsive-table .button {
    margin: 0 4px;
}

.lit-note,
.lit-meta,
.lit-customer-address {
    line-height: 1.4;
}

@media (max-width: 767px) {
    .lit-interne-terminy .manage-table.responsive-table th,
    .lit-interne-terminy .manage-table.responsive-table td {
        padding: 8px 10px;
        display: block;
        width: 100%;
    }

    .lit-interne-terminy .manage-table.responsive-table tr {
        border-bottom: 1px solid #eee;
        margin-bottom: 12px;
        display: block;
    }

    .lit-interne-terminy .manage-table.responsive-table tr td:last-child {
        text-align: left;
    }

    .lit-interne-terminy .manage-table.responsive-table td strong {
        display: block;
    }

    .lit-interne-terminy .manage-table.responsive-table td br {
        display: none;
    }

    .lit-interne-terminy .manage-table.responsive-table .lit-note,
    .lit-interne-terminy .manage-table.responsive-table .lit-meta {
        margin-top: 6px;
    }

    .lit-interne-terminy .manage-table.responsive-table .internal-badge {
        margin-top: 4px;
        display: inline-block;
    }
}

.lit-customer-address,
.lit-note,
.lit-meta {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.lit-note.muted {
    color: #999;
}

.lit-meta {
    font-style: italic;
}

.lit-send-row .lit-inline-toggle {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    background: #f7f7f7;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #e2e2e2;
}

.lit-send-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 6px 0 0;
    display: block;
}


/* Status badges */
.booking-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.booking-status.confirmed {
    background: #4caf50;
    color: white;
}

.booking-status.pending {
    background: #ff9800;
    color: white;
}

.booking-status.cancelled {
    background: #f44336;
    color: white;
}

.booking-status.completed {
    background: #2196f3;
    color: white;
}

/* Filter sekcia */
.dashboard-list-filter {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.dashboard-list-filter input,
.dashboard-list-filter select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
}

/* Edit modal */
.lit-edit-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.lit-edit-modal.active {
    display: block;
}

.lit-edit-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 4px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.lit-quick-booking-modal-close {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.lit-quick-booking-modal-close:hover,
.lit-quick-booking-modal-close:focus {
    color: black;
}

/* Messages */
.lit-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.lit-message.show {
    opacity: 1;
}

.lit-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.lit-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Loading spinner */
.lit-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f91942;
    border-radius: 50%;
    animation: lit-spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes lit-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Kalendár integrácia */
.calendar-wrapper .internal-appointment {
    background: #fff3e0 !important;
    border-color: #ff9800 !important;
}

.calendar-wrapper .internal-appointment:after {
    content: "INT";
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff9800;
    color: white;
    padding: 1px 3px;
    font-size: 9px;
    border-radius: 2px;
    font-weight: bold;
}

/* Quick booking button */
.lit-quick-internal-booking {
    margin-left: 5px;
}

/* Kalendárny detail interného termínu */
.lit-internal-calendar-detail {
    background: #fff;
    border-radius: 8px;
    padding: 22px 26px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.lit-internal-calendar-detail h4 {
    font-size: 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lit-internal-calendar-detail h4 i {
    color: #ff9800;
}

.lit-internal-calendar-detail .detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
}

.lit-internal-calendar-detail .detail-item {
    flex: 1 1 220px;
}

.lit-internal-calendar-detail .detail-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 6px;
}

.lit-internal-calendar-detail .detail-value {
    font-size: 15px;
    color: #1f2933;
    font-weight: 600;
}

.lit-internal-calendar-detail .detail-notes {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #eceff2;
    color: #374151;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
}

.lit-internal-calendar-detail .status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 152, 0, 0.12);
    color: #c05621;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-list-filter .row > div {
        margin-bottom: 10px;
    }
    
    .manage-table.responsive-table {
        font-size: 14px;
    }
    
    .lit-edit-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* Print styles */
@media print {
    .lit-edit-appointment,
    .lit-delete-appointment,
    .dashboard-list-filter {
        display: none !important;
    }
}
