/* --- Global Styles & Variables --- */
:root {
    --opine-navy: #1A365D;
    --opine-teal: #0D9488;
    --opine-gold: #F59E0B;
    --opine-gray: #334155;
    --opine-light: #F8FAFC;
}

/* --- Custom Select Arrows --- */
.custom-select-arrow {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231A365D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 1.5em !important;
    padding-right: 2.5rem !important;
}

.display-contents {
    display: contents;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--opine-light);
    color: var(--opine-gray);
    -webkit-font-smoothing: antialiased;
}

/* --- Shared Utility Classes --- */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.3s;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Wizard Scrollbar (Teal Accent) --- */
.wizard-scrollbar::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.wizard-scrollbar::-webkit-scrollbar-track {
    background: rgba(13, 148, 136, 0.05);
    border-radius: 10px;
}

.wizard-scrollbar::-webkit-scrollbar-thumb {
    background: var(--opine-teal);
    border-radius: 10px;
    transition: background 0.3s;
}

.wizard-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* --- Common Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in, .animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

/* --- Shine Animation --- */
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Para fundos escuros (Brilho Suave sobre texto Branco) - SEM NEON */
.animate-shine {
    background: linear-gradient(120deg, #ffffff 40%, rgba(255, 255, 255, 0.5) 50%, #ffffff 60%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 4s linear infinite;
}

/* Para fundos claros (Brilho Dourado sobre texto Marinho) - PREMIUM */
.animate-shine-navy {
    background: linear-gradient(120deg, #1A365D 40%, #fbbf24 50%, #1A365D 60%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

/* --- Glass Card Premium --- */
.glass-premium {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

.shadow-premium {
    box-shadow: 
        0 10px 15px -3px rgba(26, 54, 93, 0.08), 
        0 4px 6px -2px rgba(26, 54, 93, 0.04);
}

.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.pill-active {
    background-color: var(--opine-teal) !important;
    color: white !important;
    font-weight: 700 !important;
    border-color: var(--opine-teal) !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

/* --- Search Mode Selector (Wizard vs Traditional) --- */
.search-mode-selector {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 4px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.search-mode-btn {
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-mode-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.search-mode-btn.active {
    background: white;
    color: var(--opine-navy);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-gradient {
    background: linear-gradient(135deg, #1A365D 0%, #0c203b 100%);
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

.step-active {
    color: #0D9488;
    border-color: #0D9488;
}

.capitalize {
    text-transform: capitalize;
}

/* --- Skeletons & Loading States --- */
@keyframes skeletonPulse {
    0% {
        background-color: #e2e8f0;
    }

    50% {
        background-color: #f1f5f9;
    }

    100% {
        background-color: #e2e8f0;
    }
}

.skeleton-white-pulse {
    animation: skeletonPulse 1.5s ease-in-out infinite;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.skeleton-pulse {
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: 4px;
    color: transparent !important;
    background-color: #e2e8f0;
}

.skeleton-pulse * {
    visibility: hidden !important;
}

.skeleton-text {
    display: inline-block;
    height: 1em;
    vertical-align: middle;
}

/* Dinamismo da Seção de Formação - Premium UI */
#educationContainer>div:nth-child(n+3) {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

#educationContainer.expanded>div:nth-child(n+3) {
    display: flex;
}

#toggleFormationBtn svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#toggleFormationBtn svg.rotate-180 {
    transform: rotate(180deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Modal Blur Effects --- */
.modal-blur-active {
    overflow: hidden !important;
}

.modal-blur-active>*:not(#galleryModal):not(.modal-overlay-logic):not(nav):not(header) {
    filter: blur(12px) brightness(0.8);
    transition: filter 0.4s ease, brightness 0.4s ease;
    pointer-events: none;
    user-select: none;
}

/* Smooth transition when opening */
body:not(.modal-blur-active)>* {
    transition: filter 0.4s ease, brightness 0.4s ease;
}

/* Hero Background Image */
.hero-background-image {
    background-image: url('../img/hero-bg.jpg');
}

/* --- Carousel Premium Enhancements (v2.0) --- */
@keyframes carouselPeek {
    0% { transform: translateX(0); }
    30% { transform: translateX(-40px); } /* Swipe left to see right */
    100% { transform: translateX(0); }
}

.carousel-animate-peek {
    animation: carouselPeek 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Máscara de gradiente para indicar continuidade (Mobile) */
@media (max-width: 768px) {
    .carousel-mask-container {
        position: relative;
    }
    
    .carousel-mask-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 60px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
        pointer-events: none;
        z-index: 10;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .carousel-mask-active::after {
        opacity: 1;
    }
}

/* Indicadores (Dots) */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

/* Ocultar indicadores no Desktop por padrão, já que o grid exibe todos os itens */
@media (min-width: 768px) {
    .carousel-indicators {
        display: none !important;
    }
}

.carousel-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e1; /* Gray-300 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot.active {
    background-color: var(--opine-teal);
    width: 24px;
    border-radius: 10px;
}

/* ============================================================
   DOCTOR ONBOARDING TOUR — Premium UI
   Nivel 1: Tokens de CSS e componentes do tour médico
   ============================================================ */

/* --- Overlay (Backdrop Blur) --- */
.doctor-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.doctor-tour-overlay.is-visible {
    opacity: 1;
}

/* --- Tooltip (Card Glassmorphism) --- */
.doctor-tour-tooltip {
    position: fixed;
    z-index: 1001;
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow:
        0 32px 64px -12px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.doctor-tour-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Quando posicionado no centro, corrige o transform */
.doctor-tour-tooltip[style*="translate(-50%, -50%)"].is-visible {
    transform: translate(-50%, -50%) scale(1);
}

/* --- Elemento Destacado (Spotlight) --- */
.doctor-tour-highlighted {
    box-shadow:
        0 0 0 3px var(--opine-teal),
        0 0 24px rgba(13, 148, 136, 0.45) !important;
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.08) !important;
    transition: box-shadow 0.3s ease, border-radius 0.3s ease !important;
}

/* --- Header do Tooltip --- */
.doctor-tour-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.doctor-tour-icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 100%);
    border: 1px solid rgba(13, 148, 136, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.doctor-tour-skip-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: #f8fafc;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.doctor-tour-skip-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* --- Textos --- */
.doctor-tour-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--opine-navy);
    line-height: 1.3;
    margin-bottom: 0.625rem;
}

.doctor-tour-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* --- Barra de Progresso --- */
.doctor-tour-progress {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.doctor-tour-progress-dot {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: #e2e8f0;
    transition: background 0.4s ease;
}

.doctor-tour-progress-dot.is-active {
    background: var(--opine-teal);
    box-shadow: 0 0 8px rgba(13, 148, 136, 0.4);
}

/* --- Ações --- */
.doctor-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.doctor-tour-counter {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.doctor-tour-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.doctor-tour-btn-back {
    padding: 0.625rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.doctor-tour-btn-back:hover {
    border-color: var(--opine-navy);
    color: var(--opine-navy);
}

.doctor-tour-btn-next {
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    border: none;
    background: var(--opine-navy);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.doctor-tour-btn-next:hover {
    background: var(--opine-teal);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.doctor-tour-btn-next:active {
    transform: scale(0.97);
}

/* --- Botão "Revisitar Tutorial" na Sidebar --- */
.doctor-tour-replay-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: all 0.25s;
}

.doctor-tour-replay-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.doctor-tour-replay-btn i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
}

/* --- Mobile --- */
@media (max-width: 767px) {
    .doctor-tour-tooltip {
        border-radius: 1.25rem 1.25rem 0 0;
    }
}

/* --- Custom Dropdown Premium UI --- */
.custom-dropdown .dropdown-options {
    transform-origin: top;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown .option.selected {
    background-color: #f0fdfa !important; /* teal-50 */
    color: var(--opine-teal) !important;
}

.custom-dropdown .option.selected i {
    opacity: 1 !important;
}

.custom-dropdown .dropdown-trigger:focus {
    border-color: var(--opine-teal);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1);
}

/* Custom Scrollbar for Dropdown */
.custom-dropdown .dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown .dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-dropdown .dropdown-options::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.custom-dropdown .dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* --- Premium Search Dropdown (Wizard Parity) --- */
.search-dropdown-premium {
    max-height: 16rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

@media (max-width: 768px) {
    .search-dropdown-premium {
        max-height: 60vh;
        border-radius: 1.5rem;
    }
}

.search-dropdown-premium::-webkit-scrollbar {
    width: 5px;
}

.search-dropdown-premium::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
