* {
    font-family: 'Manrope', sans-serif;
    touch-action: manipulation;
}
.time-slot {
    min-height: 40px;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
}
.time-slot:hover {
    background-color: #f5edff;
    border-left: 3px solid #9311d4;
    padding-left: 0.5rem;
}
.reserva-block {
    animation: fadeIn 0.4s ease-out;
    transition: all 0.3s ease;
}
.reserva-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.modal {
    display: none;
    position: fixed;
    z-index: 80;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease;
}
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}
.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}
.badge-info {
    background-color: #ede9fe;
    color: #5b21b6;
}
.tab-btn {
    position: relative;
    overflow: hidden;
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #9311d4;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.tab-btn.active::after {
    width: 100%;
}
.current-time-marker {
    position: relative;
    height: 0;
}
.current-time-marker::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 2px solid #9311d4;
}
.current-time-marker::after {
    content: '';
    position: absolute;
    left: 0;
    top: -4px;
    width: 8px;
    height: 8px;
    background: #9311d4;
    border-radius: 9999px;
    box-shadow: 0 0 0 2px #ffffff;
}
.scroll-top-btn {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.scroll-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-top-btn.hide {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.ptr-indicator {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-14px);
    opacity: 0;
    pointer-events: none;
    z-index: 85;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ptr-indicator.ptr-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ptr-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
}

.ptr-indicator.ptr-ready .ptr-badge {
    background: rgba(147, 17, 212, 0.95);
}

.ptr-icon {
    font-size: 16px !important;
    line-height: 1;
}

.ptr-indicator.ptr-refreshing .ptr-icon {
    animation: ptrSpin 0.9s linear infinite;
}

@keyframes ptrSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.time-slot.hora-separator {
    position: relative;
}
.time-slot.hora-separator::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -5px;
    height: 1px;
    border-top: 3px dashed #d1d1d1ff;
    pointer-events: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
/* Specialist cards horizontal scroll */
.cal-sticky-header {
    position: sticky;
    top: var(--header-height, 56px);
    z-index: 30;
}
.config-tabs-sticky {
    position: sticky;
    top: calc(var(--header-height, 56px) + 8px);
    z-index: 25;
}
.ar-quick-filter-active {
    box-shadow: 0 0 0 2px rgba(147, 17, 212, 0.25);
    border: 1px solid rgba(147, 17, 212, 0.45);
}
.especialista-cards-wrapper {
    position: relative;
}
.especialista-cards {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 2px 0;
}
.especialista-cards::-webkit-scrollbar {
    display: none;
}
.especialista-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}
.especialista-card:hover {
    border-color: var(--card-color, #9311d4);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.especialista-card.active {
    border-color: var(--card-color, #9311d4);
    background: #fff;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--card-color, #9311d4) 30%, transparent);
}
.especialista-card-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.especialista-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.especialista-card-name-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.especialista-card-public {
    color: #64748b;
    flex-shrink: 0;
    line-height: 1;
}
.especialista-card.active .especialista-card-name {
    color: var(--card-color, #9311d4);
}
.especialista-card.active .especialista-card-public {
    color: var(--card-color, #9311d4);
}

@media (max-width: 640px) {
    .especialista-card {
        padding: 4px 10px 4px 4px;
        gap: 5px;
    }
    .especialista-card-avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    .especialista-card-name {
        font-size: 11px;
    }
}

/* Estilos para Select2 */
.select2-container--default .select2-selection--single {
    height: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.4;
    padding-left: 0;
    padding-right: 20px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    top: 1px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #9311d4;
}
.select2-dropdown {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
}
.select2-results__option[data-create] {
    color: #9311d4;
    font-weight: 600;
}
input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.2;
}

/* Desktop nav active override (JS injects gradient classes, we override) */
.desktop-nav .tab-btn {
    background-color: transparent !important;
    background-image: none !important;
}
.desktop-nav .tab-btn.active {
    background-image: none !important;
    background-color: rgba(147, 17, 212, 0.08) !important;
    color: #9311d4 !important;
    box-shadow: none !important;
}
.desktop-nav .tab-btn.active::after {
    background: #9311d4;
}

@media (max-width: 640px) {
    input[type="date"] {
        height: 40px;
        min-height: 40px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    /* Full-width fixed bottom navigation bar */
    .mobile-bottom-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        z-index: 40;
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e2e8f0;
        border-radius: 0 !important;
        padding: 6px 4px 18px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible;
        transform: none !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
        display: flex !important;
        align-items: center;
        justify-content: space-around;
        gap: 0;
    }
    .mobile-bottom-nav .tab-btn {
        position: relative;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 4px 8px !important;
        border-radius: 8px !important;
        flex: 1 1 0%;
        justify-content: center;
        min-width: 0;
        font-size: 0;
        /* Override JS-injected gradient classes */
        background-image: none !important;
        background-color: transparent !important;
        box-shadow: none !important;
        color: #94a3b8;
        border: none !important;
        outline: none !important;
    }
    .mobile-bottom-nav .tab-btn::after {
        display: none !important;
    }
    .mobile-bottom-nav .tab-btn .nav-icon {
        font-size: 22px;
        line-height: 1;
    }
    .mobile-bottom-nav .tab-btn .mobile-nav-especialista-badge {
        position: absolute;
        top: 2px;
        right: 16px;
        width: 16px;
        height: 16px;
        border-radius: 9999px;
        background: #0f172a;
        color: #fff;
        font-size: 10px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #ffffff;
        line-height: 1;
    }
    .mobile-bottom-nav .tab-btn .mobile-nav-especialista-badge.hidden {
        display: none !important;
    }
    .mobile-bottom-nav .tab-btn .nav-label {
        display: inline !important;
        font-size: 9px;
        font-weight: 700;
        color: inherit;
        line-height: 1;
    }
    .mobile-bottom-nav .tab-btn.active {
        color: #9311d4 !important;
        background-image: none !important;
        background-color: transparent !important;
        box-shadow: none !important;
    }
    .mobile-bottom-nav .tab-btn.active .nav-label {
        color: #9311d4;
    }

    .main-mobile-padding {
        padding-bottom: 80px;
    }
    body {
        padding-bottom: 80px;
    }
}

#edit-reserva-hora-inicio {
    max-width: 100%;
}

/* Login modal */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@media (max-width: 640px) {
    .login-overlay {
        align-items: flex-start;
        padding-top: 2.5rem;
    }
}

/* Material Symbols fill variation for active nav icon */
.material-symbols-filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
