/* ============================================================
   EarthStatus — Feature Styles
   Share buttons, Since-You-Opened banner, Birthday modal, Embed modal, Toast
   ============================================================ */

/* ── Share Stat Button ───────────────────────────────────── */
.share-stat-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 200ms ease;
    z-index: 10;
}

.stat-card:hover .share-stat-btn {
    opacity: 1;
}

.share-stat-btn:hover {
    background: rgba(255, 159, 10, 0.15);
    border-color: rgba(255, 159, 10, 0.3);
    color: #ff9f0a;
    transform: scale(1.08);
}


/* ── Toast Notification ──────────────────────────────────── */
#wp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f5f7;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 14px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#wp-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}


/* ── Since You Opened Banner ─────────────────────────────── */
#since-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    transform: translateY(100%);
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

#since-banner.visible {
    transform: translateY(0);
}

.since-banner-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px 20px 0 0;
}

.since-banner-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-primary, #ff9f0a);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.since-banner-stats {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.since-stat {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.since-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.since-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.since-close {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 150ms ease;
}

.since-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}


/* ── Modal (shared styles for Birthday + Embed) ──────────── */
.wp-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.wp-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 36px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: scale(0.95) translateY(10px);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-modal.open .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #f5f5f7;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.modal-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 24px;
    line-height: 1.5;
}


/* ── Birthday Stats Modal ────────────────────────────────── */
.birthday-form {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.birthday-form input[type="date"] {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f7;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 200ms ease;
}

.birthday-form input[type="date"]:focus {
    border-color: rgba(255, 159, 10, 0.5);
}

.birthday-form button {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    background: var(--accent-primary, #ff9f0a);
    color: #000;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 200ms ease;
}

.birthday-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 159, 10, 0.25);
}

#birthday-results {
    display: none;
}

#birthday-results.show {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.birthday-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.birthday-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.birthday-result-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #f5f5f7;
}

.birthday-result-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.3;
}

.birthday-share-btn {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 159, 10, 0.2);
    background: rgba(255, 159, 10, 0.08);
    color: #ff9f0a;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 200ms ease;
}

.birthday-share-btn:hover {
    background: rgba(255, 159, 10, 0.15);
}


/* ── Embed Widget Modal ──────────────────────────────────── */
.embed-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f7;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    margin-bottom: 16px;
    appearance: none;
    cursor: pointer;
}

.embed-select option {
    background: #1c1c1e;
    color: #f5f5f7;
}

.embed-preview {
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.embed-code-wrapper {
    position: relative;
}

.embed-code {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ff9f0a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    word-break: break-all;
    line-height: 1.5;
    margin-bottom: 12px;
}

.embed-copy-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f7;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 200ms ease;
}

.embed-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* ── CTA Bar (Birthday + Embed triggers) ─────────────────── */
.cta-bar {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto 60px;
    padding: 0 20px;
    display: flex;
    gap: 12px;
}

.cta-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 250ms ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 12px rgba(0, 0, 0, 0.1);
}

.cta-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.2);
}

.cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.cta-icon-birthday {
    background: rgba(255, 159, 10, 0.12);
}

.cta-icon-embed {
    background: rgba(255, 107, 107, 0.12);
}

.cta-text h3 {
    font-size: 14px;
    font-weight: 600;
    color: #f5f5f7;
    margin-bottom: 2px;
}

.cta-text p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* ── Live Data Section Cards ─────────────────────────────── */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 600;
    color: #ff9f0a;
    background: rgba(255, 159, 10, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.live-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff9f0a;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}


/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .since-banner-stats {
        gap: 12px;
    }

    .since-val {
        font-size: 13px;
    }

    .since-banner-title {
        display: none;
    }

    .cta-bar {
        flex-direction: column;
    }

    #birthday-results.show {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 24px;
    }
}
