@import url('./colors.css');

/* Blog listing and post modal. Hidden until scripts/blog-vibe-popup.js opens it. */

.vibe-popup {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.vibe-popup[hidden] {
    display: none !important;
}

.vibe-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 10, 32, 0.72);
}

.vibe-popup__dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    width: min(920px, 100%);
    height: min(34rem, calc(100dvh - 2.5rem));
    max-height: calc(100dvh - 2.5rem);
    overflow: hidden;
    color: var(--text-inverse);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(140, 107, 232, 0.38), transparent 52%),
        #1b1036;
    border: 1px solid rgba(167, 139, 250, 0.32);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(12, 6, 28, 0.55);
}

.vibe-popup__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.vibe-popup__close:hover,
.vibe-popup__close:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.vibe-popup__review {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.35rem;
    min-height: 0;
    overflow: auto;
    padding: 1.75rem 1.6rem 1.6rem;
    background: rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.vibe-popup__source {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
}

.vibe-popup__source:hover .vibe-popup__source-name,
.vibe-popup__source:focus-visible .vibe-popup__source-name {
    text-decoration: underline;
}

.vibe-popup__chrome {
    display: block;
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
}

.vibe-popup__source-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.vibe-popup__source-name {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.vibe-popup__review time {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    line-height: 1.2;
}

.vibe-popup__review blockquote {
    margin: 0;
}

.vibe-popup__review blockquote p {
    margin: 0;
    color: #fff;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.35;
}

.vibe-popup__person {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.vibe-popup__company {
    display: block;
    height: 1.7rem;
    width: auto;
    max-width: 11.5rem;
    padding: 0.35rem 0.55rem;
    background: #fff;
    border-radius: 8px;
}

.vibe-popup__name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem 0.7rem;
}

.vibe-popup__stars {
    margin: 0;
    color: #ffc107;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    line-height: 1;
    text-shadow: 0 0 14px rgba(255, 193, 7, 0.45);
}

.vibe-popup__person cite {
    color: #fff;
    font-style: normal;
    font-size: 1rem;
    font-weight: 700;
}

.vibe-popup__role {
    display: block;
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.85rem;
    line-height: 1.35;
}

.vibe-popup__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
    min-height: 0;
    padding: 3.2rem 2.1rem 2rem 1.85rem;
}

.vibe-popup__copy h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.85rem, 3vw, 2.55rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.vibe-popup__copy p {
    margin: 0;
    max-width: 28rem;
    color: #f7f4ff;
    font-size: 1.2rem;
    line-height: 1.6;
}

.vibe-popup__cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.45rem;
    padding: 0.95rem 1.55rem;
    border-radius: 999px;
    background: var(--color-nav);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(24, 119, 242, 0.35);
}

.vibe-popup__cta:hover,
.vibe-popup__cta:focus-visible {
    background: var(--color-nav-hover);
    color: #fff;
    outline: 2px solid #fff;
    outline-offset: 3px;
}

html.vibe-popup-lock,
html.vibe-popup-lock body {
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .vibe-popup__backdrop {
        animation: vibe-popup-fade 0.2s ease;
    }

    .vibe-popup__dialog {
        animation: vibe-popup-rise 0.22s ease;
    }
}

@keyframes vibe-popup-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vibe-popup-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
    .vibe-popup {
        padding: 0.75rem;
        align-items: center;
    }

    .vibe-popup__dialog {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        width: 100%;
        height: auto;
        max-height: calc(100dvh - 1.25rem);
    }

    .vibe-popup__review {
        max-height: min(42dvh, 18rem);
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 3.25rem;
    }

    .vibe-popup__copy {
        padding: 1.15rem 1.15rem 1.25rem;
    }

    .vibe-popup__copy h2 {
        font-size: 1.7rem;
        padding-right: 0;
    }

    .vibe-popup__cta {
        width: 100%;
    }
}

@media print {
    .vibe-popup {
        display: none !important;
    }
}
