/* ==========================================================================
   ÚJ: Dedikált, animált bezáró gomb stílusok a modális ablakokhoz
   ========================================================================== */

.modal-content .animated-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    border: none;
    background: rgba(84, 193, 198, 0.1);
    border-radius: 50%;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-content .animated-close-button::before,
.modal-content .animated-close-button::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background-color: #54C1C6;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.modal-content .animated-close-button::before {
    transform: rotate(45deg);
}

.modal-content .animated-close-button::after {
    transform: rotate(-45deg);
}

.modal-content .animated-close-button:hover {
    background: rgba(84, 193, 198, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.modal-content .animated-close-button:hover::before,
.modal-content .animated-close-button:hover::after {
    background-color: #e74c3c;
    width: 14px;
}

/* Improved modal styles for better mobile responsiveness */
.modal {
    width: 90%;
    max-width: 600px;
    margin: auto;
    overflow-x: hidden;
    /* Additional styles for mobile responsiveness */
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    position: relative;
    z-index: 100;
    overflow-y: auto;
    /* Additional styles for better appearance */
}

/* ÚJ: Óranaplózás modal - teljes képernyő mobil nézeten - NE egészítsd felül! */
@media (max-width: 480px) {
    .modal-content {
        padding: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

/* JAVÍTÁS: A szabály ne vonatkozzon a bezáró gombra, hogy a padding ne tegye oválissá. */
.modal-content button:not(.close-button):not(.reset-button-corner),
.modal-content .btn:not(.close-button) {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 80px;
    padding: 10px 16px !important;
    z-index: auto !important;
    margin: 5px !important;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="date"],
.modal-content input[type="time"],
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 4px;
    border: 1px solid var(--border-color, #ccc); /* Változó használata a fix szín helyett */
    font-size: 1rem;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .modal {
        width: 95%;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .modal-content button:not(.close-button),
    .modal-content .btn:not(.close-button) {
        width: 100%;
        margin: 8px 0 !important;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 12px;
    }
    
    .modal-content button:not(.close-button):not(.reset-button-corner),
    .modal-content .btn:not(.close-button) {
        width: 100%;
        padding: 12px 10px !important;
        font-size: 0.9rem;
    }
}

/* JAVÍTÁS: A szelektor specifikusabbá tétele, hogy felülírja az általános .modal-content button stílust */
.modal-content .close-button {
    position: absolute !important; /* Pozíció visszaállítása */
    top: 15px !important; /* Pozíció visszaállítása */
    right: 15px !important; /* Pozíció visszaállítása */
    width: 32px !important; /* Fix szélesség */
    height: 32px !important; /* Fix magasság */
    font-size: 1.5rem !important; /* Betűméret visszaállítása */
    cursor: pointer !important;
    border: none !important; /* Keret eltávolítása */
    background: var(--primary-color) !important; /* Háttér visszaállítása - sötétebb, hogy látszódjon */
    color: var(--text-color) !important; /* Szín visszaállítása */
    display: flex !important; /* Flexbox a középre igazításhoz */
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important; /* Kerek forma */
    transition: all 0.3s ease !important;
    padding: 0 !important; /* Padding nullázása */
    aspect-ratio: 1 / 1 !important; /* Biztosítja a kör alakot */
    margin: 0 !important; /* Margó nullázása */
    text-transform: none !important; /* Ne legyen nagybetűs */
    min-width: unset !important;
    z-index: 1100 !important; /* Legyen legfelül */
}

.modal-content .close-button:hover {
    background-color: var(--primary-color-dark) !important;
    color: white !important;
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 0 10px rgba(84, 193, 198, 0.5) !important;
}

.modal-content .reset-button-corner {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important; /* Moved to left corner */
    right: auto !important; /* Unset right positioning */
    width: 40px !important; /* Larger background */
    height: 40px !important; /* Larger background */
    font-size: 1.2rem !important; /* Larger icon */
    cursor: pointer !important;
    border: none !important;
    background: rgba(84, 193, 198, 0.4) !important; /* Stronger background */
    color: var(--primary-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important; /* Rounded square */
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    text-transform: none !important;
    min-width: unset !important;
    z-index: 10;
}

.modal-content .reset-button-corner:hover {
    background-color: rgba(84, 193, 198, 0.6) !important;
    transform: scale(1.1) !important; /* Adjusted transform */
    box-shadow: 0 0 12px rgba(84, 193, 198, 0.6) !important;
}

.modal-title-padded {
    margin-top: 40px !important;
}

/* ==========================================================================
   IDŐPONTFOGLALÁS UI STÍLUSOK
   ========================================================================== */

.appointment-booking-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.appointment-date-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.appointment-date-tabs::-webkit-scrollbar {
    height: 4px;
}

.appointment-date-tabs::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.appointment-date-tabs::-webkit-scrollbar-thumb {
    background: rgba(84, 193, 198, 0.3);
    border-radius: 10px;
}

.appointment-date-tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(84, 193, 198, 0.6);
}

.appointment-tab-btn {
    flex-shrink: 0;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 120px;
    font-family: 'Urbanist', 'Roboto', sans-serif;
}

.appointment-tab-btn:hover {
    border-color: #54C1C6;
    background: rgba(84, 193, 198, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 193, 198, 0.2);
}

.appointment-tab-btn.active {
    border-color: #54C1C6;
    background: linear-gradient(135deg, rgba(84, 193, 198, 0.2), rgba(84, 193, 198, 0.05));
    color: #54C1C6;
    box-shadow: 0 4px 16px rgba(84, 193, 198, 0.3);
}

.appointment-tab-btn .tab-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: inherit;
}

.appointment-tab-btn .tab-count {
    font-size: 0.75rem;
    opacity: 0.7;
    white-space: nowrap;
}

.appointment-slots-container {
    position: relative;
    min-height: 300px;
}

.appointment-slots-group {
    display: none;
    animation: fadeIn 0.3s ease;
}

.appointment-slots-group.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.appointment-day-header {
    font-size: 1.1rem;
    color: #34495e;
    margin-bottom: 15px;
    margin-top: 0;
    font-weight: 600;
}

.appointment-slots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.appointment-slot-item {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.appointment-slot-item:hover {
    border-color: #54C1C6;
    box-shadow: 0 6px 20px rgba(84, 193, 198, 0.15);
    background: rgba(84, 193, 198, 0.02);
}

.appointment-slot-item .slot-time {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.appointment-slot-item .slot-time i {
    color: #54C1C6;
    font-size: 1.2rem;
}

.appointment-slot-item .time-range {
    font-weight: 600;
    color: #34495e;
    white-space: nowrap;
}

.btn-book-appointment {
    flex-shrink: 0;
    padding: 10px 16px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.appointment-booking-empty {
    text-align: center;
    padding: 40px 20px;
    background: rgba(84, 193, 198, 0.05);
    border-radius: 12px;
    border: 2px dashed #54C1C6;
    color: #34495e;
}

.appointment-booking-empty i {
    font-size: 3rem;
    color: #54C1C6;
    margin-bottom: 15px;
    opacity: 0.5;
}

.appointment-booking-empty p {
    margin: 0;
    font-size: 1.1rem;
}

/* Mobilnézethez adaptáció */
@media (max-width: 768px) {
    .appointment-slots-list {
        grid-template-columns: 1fr;
    }

    .appointment-slot-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .appointment-slot-item .slot-time {
        width: 100%;
    }

    .btn-book-appointment {
        width: 100%;
        justify-content: center;
    }

    .appointment-tab-btn {
        min-width: 100px;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .appointment-tab-btn .tab-label {
        font-size: 0.8rem;
    }

    .appointment-tab-btn .tab-count {
        font-size: 0.7rem;
    }
}
