/* ==========================================================================
   COSETTE.PHIL — NEW USER DISCOVERY & CHECKOUT ONBOARDING GUIDE
   Modern luxury spotlight walkthrough for first-time shoppers.
   ========================================================================== */

/* 1. Backdrop Spotlight Overlay */
.cosette-spotlight-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cosette-spotlight-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 2. Dynamic Cutout Highlight Hole */
.cosette-spotlight-hole {
    position: fixed;
    box-shadow: 0 0 0 9999px rgba(18, 16, 14, 0.75), 0 0 24px rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.3, 1);
    z-index: 10051;
    opacity: 0;
    visibility: hidden;
}

.cosette-spotlight-hole.is-active {
    opacity: 1;
    visibility: visible;
}

/* Pulsing ambient border around the spotlighted element */
.cosette-spotlight-hole::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    animation: cosetteSpotlightPulse 2s infinite ease-in-out;
    pointer-events: none;
}

@keyframes cosetteSpotlightPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.02); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* 3. Floating Spotlight Tooltip Card */
.cosette-tour-card {
    position: fixed;
    z-index: 10055;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 24px 20px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), top 0.35s ease, left 0.35s ease;
}

.cosette-tour-card.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Card Header */
.cosette-tour-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cosette-tour-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8c8275;
    background: #f6f3ee;
    padding: 4px 10px;
    border-radius: 20px;
}

.cosette-tour-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2b2621;
}

.cosette-tour-close-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #999;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.cosette-tour-close-btn:hover {
    color: #111;
    background: #f1ede7;
}

/* Card Body */
.cosette-tour-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.cosette-tour-icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: #2b2621;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.cosette-tour-title {
    font-family: 'Tenor Sans', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.25;
}

.cosette-tour-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #555555;
    margin-bottom: 14px;
}

/* Highlights Box */
.cosette-tour-highlights {
    background: #faf8f5;
    border: 1px solid #eee8df;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cosette-tour-highlight-item {
    font-size: 0.82rem;
    color: #2b2621;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cosette-tour-highlight-item i {
    color: #8c8275;
    font-size: 0.78rem;
}

/* Card Footer & Controls */
.cosette-tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f0ece6;
}

.cosette-tour-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cosette-tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #dfdacf;
    transition: all 0.25s ease;
}

.cosette-tour-dot.is-active {
    width: 18px;
    border-radius: 4px;
    background: #2b2621;
}

.cosette-tour-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cosette-tour-btn-prev {
    background: #f4efe9;
    color: #333333;
    border: none;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cosette-tour-btn-prev:hover {
    background: #e8e2d8;
}

.cosette-tour-btn-next {
    background: #2b2621;
    color: #ffffff;
    border: none;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(43, 38, 33, 0.2);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.cosette-tour-btn-next:hover {
    background: #181512;
    transform: translateY(-1px);
}

/* 4. Elegant Welcome Slide-up Banner Toast for New Visitors */
.cosette-welcome-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    z-index: 10040;
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 540px;
    width: calc(100vw - 32px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.cosette-welcome-toast.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.cosette-welcome-toast-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: #f7f4ef;
    color: #2b2621;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.cosette-welcome-toast-content {
    flex: 1;
}

.cosette-welcome-toast-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 3px 0;
}

.cosette-welcome-toast-desc {
    font-size: 0.82rem;
    color: #666666;
    margin: 0;
    line-height: 1.35;
}

.cosette-welcome-toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cosette-welcome-btn-start {
    background: #2b2621;
    color: #ffffff;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.cosette-welcome-btn-start:hover {
    background: #181512;
}

.cosette-welcome-btn-dismiss {
    background: transparent;
    color: #888888;
    border: none;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.cosette-welcome-btn-dismiss:hover {
    color: #222222;
}

/* 5. Floating "How to Order / Guide" Launcher Button - HIDDEN by default; only shown for first-time visitors */
.cosette-guide-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10020;
    display: none; /* Never show by default; only shown for new visitors */
    align-items: center;
    background: #ffffff;
    color: #2b2621;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    padding: 2px 4px 2px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Instrument Sans', sans-serif;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.cosette-guide-launcher.is-visible {
    display: inline-flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cosette-guide-launcher:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.cosette-launcher-trigger {
    background: none;
    border: none;
    padding: 6px 8px 6px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    cursor: pointer;
}

.cosette-launcher-trigger i {
    color: #eab308;
    transition: color 0.2s ease;
}

.cosette-guide-launcher:hover .cosette-launcher-trigger i {
    color: #ca8a04;
}

.cosette-launcher-dismiss {
    background: transparent;
    border: none;
    color: #999999;
    font-size: 1.15rem;
    line-height: 1;
    padding: 4px 6px;
    margin-left: 2px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.cosette-launcher-dismiss:hover {
    color: #111111;
    background: rgba(0, 0, 0, 0.06);
}

.cosette-welcome-toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #888888;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.cosette-welcome-toast-close:hover {
    color: #111111;
}

/* Responsive Tweaks */
@media (max-width: 576px) {
    .cosette-tour-card {
        width: calc(100vw - 24px);
        left: 12px !important;
        right: 12px !important;
        padding: 18px 16px 14px;
        border-radius: 14px;
    }

    .cosette-welcome-toast {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        bottom: 12px;
        padding: 14px 14px 12px;
        border-radius: 12px;
        width: calc(100vw - 20px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.06);
    }

    .cosette-welcome-toast-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 8px;
        margin-bottom: 2px;
    }

    .cosette-welcome-toast-title {
        font-size: 0.9rem;
        padding-right: 20px;
    }

    .cosette-welcome-toast-desc {
        font-size: 0.77rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .cosette-welcome-toast-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        gap: 8px;
    }

    .cosette-welcome-btn-start {
        font-size: 0.78rem;
        padding: 7px 13px;
    }

    .cosette-welcome-btn-dismiss {
        font-size: 0.78rem;
        padding: 7px 11px;
    }

    .cosette-guide-launcher {
        bottom: 12px;
        right: 12px;
        padding: 2px 4px 2px 10px;
        font-size: 0.74rem;
        border-radius: 20px;
    }

    .cosette-launcher-trigger {
        padding: 4px 6px 4px 0;
        gap: 6px;
    }

    .cosette-launcher-dismiss {
        padding: 2px 4px;
        font-size: 1rem;
    }
}

/* Modal conflict prevention */
body.modal-open .cosette-welcome-toast,
body.modal-open .cosette-guide-launcher {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

