/* ============================================================
   COMPONENTS.CSS — Reusable UI Components
   Clínica Dra. Elenita Luzardo
   ============================================================ */

/* ── COOKIE CONSENT BANNER ────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(140%);
    z-index: 9999;
    width: calc(100% - 2rem);
    max-width: 780px;
    background: #fdfbf7;
    border: 1px solid #e5d8c5;
    border-radius: 1rem;
    box-shadow: 0 8px 40px rgba(100, 70, 30, 0.14);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
    pointer-events: none;
}

.cookie-banner.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner.is-hiding {
    transform: translateX(-50%) translateY(140%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
}

.cookie-banner__text {
    flex: 1;
    min-width: 0;
}

.cookie-banner__title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #4a3520;
    margin-bottom: 0.3rem;
}

.cookie-banner__desc {
    font-family: 'Lato', sans-serif;
    font-size: 0.78rem;
    color: #7a6655;
    line-height: 1.55;
}

.cookie-banner__actions {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
}

.cookie-banner__btn {
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
    letter-spacing: 0.02em;
    border: 1.5px solid transparent;
}

.cookie-banner__btn:hover {
    transform: translateY(-1px);
}

.cookie-banner__link {
    color: #916E44;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__link:hover {
    color: #7a5c35;
}

.cookie-banner__btn--primary {
    background: #916E44;
    color: #fff;
    border-color: #916E44;
}

.cookie-banner__btn--primary:hover {
    background: #7a5c35;
    border-color: #7a5c35;
}


@media (max-width: 580px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }
    .cookie-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ── BEAM BUTTON ─────────────────────────────────────────── */
.btn-beam {
    position: relative;
    z-index: 10;
    overflow: hidden;
    display: inline-block;
}

.btn-beam::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    background: conic-gradient(from 90deg at 50% 50%, #edc57d 0%, #916E44 50%, #edc57d 100%);
    animation: spin 4s linear infinite;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-beam:hover::before {
    opacity: 1;
}

.btn-beam-content {
    background-color: #FDFBF7;
    color: #916E44;
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(145, 110, 68, 0.2);
    transition: background-color 0.3s, color 0.3s;
}

.btn-beam:hover .btn-beam-content {
    background-color: #916E44;
    color: white;
}

/* ── FLASHLIGHT CARD ─────────────────────────────────────── */
.flashlight-card {
    background: rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(237, 197, 125, 0.3);
}

.flashlight-card::before {
    content: "";
    position: absolute;
    inset: 0px;
    background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 246, 224, 0.8), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 2;
}

.flashlight-card:hover::before {
    opacity: 1;
}

/* ── NOISE GRAIN OVERLAY ─────────────────────────────────── */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ── BEFORE/AFTER SLIDER (iOS Fix) ───────────────────────── */
.ba-slider-input {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    touch-action: pan-y; /* Permite scroll vertical, bloqueia scroll horizontal na própria linha para garantir fluidez */
}

.ba-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 60px; /* Largura gigante para ser facilmente tocada */
    height: 100vh; /* Esticado para cobrir do topo à base do container */
    background: transparent;
    cursor: ew-resize;
    border: none;
}

.ba-slider-input::-moz-range-thumb {
    width: 60px;
    height: 100vh;
    background: transparent;
    cursor: ew-resize;
    border: none;
}
