/* What's new page (/whats-new). Builds on pages.css (PageHero, Lib-card, Lib-link) and docs.css (--docs-* colours). */

.Whatsnew-new {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: hsl(var(--color-pink));
    color: #fff;
    letter-spacing: 0.08em;
}

.Whatsnew-hero {
    max-width: 52rem;
}

.Whatsnew-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 1.75rem;
    margin-top: 1.75rem;
}

.Whatsnew-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0 0 3rem;
    border: 1px solid var(--docs-line-strong);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(154, 119, 207, 0.5);
}

.Whatsnew-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* In-page navigation */

.Whatsnew-jump {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 3.5rem;
    padding: 0.75rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.Whatsnew-jump::-webkit-scrollbar {
    display: none;
}

.Whatsnew-jump a {
    flex: none;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--docs-line-strong);
    border-radius: 999px;
    color: var(--docs-text);
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s, background-color 0.2s;
}

.Whatsnew-jump a:hover,
.Whatsnew-jump a:focus-visible {
    border-color: hsla(264, 48%, 64%, 0.7);
    background: hsla(264, 48%, 64%, 0.12);
}

/* Groups */

.Whatsnew-group {
    margin-bottom: 4.5rem;
    scroll-margin-top: 7rem;
}

.Whatsnew-groupTitle {
    margin: 0 0 1.5rem;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    line-height: 1.2;
}

.Whatsnew-intro {
    max-width: 46rem;
    margin: -0.5rem 0 1.75rem;
    color: var(--docs-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.Whatsnew-plan {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.12rem 0.55rem;
    border: 1px solid;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    vertical-align: 0.2em;
    white-space: nowrap;
}

.Whatsnew-plan[data-plan="all"] {
    border-color: hsla(140, 66%, 64%, 0.5);
    color: hsl(140, 66%, 74%);
}

.Whatsnew-plan[data-plan="basic"] {
    border-color: hsla(264, 48%, 64%, 0.6);
    color: hsl(264, 60%, 82%);
}

.Whatsnew-plan[data-plan="pro"] {
    border-color: hsla(26, 100%, 68%, 0.55);
    color: hsl(26, 100%, 78%);
}

/* Spotlight: text beside an example */

.Whatsnew-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
    .Whatsnew-spotlight {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 3rem;
    }
}

.Whatsnew-spotlightText h3 {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
}

.Whatsnew-spotlightText p {
    margin: 0 0 1rem;
    color: var(--docs-muted);
    line-height: 1.65;
}

.Whatsnew-spotlightText .Lib-features {
    margin-bottom: 1.25rem;
}

/* Field types list */

.Whatsnew-types {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 1.25rem;
    list-style: none;
    background: var(--card-gradient);
    border: 1px solid var(--docs-line-strong);
    border-radius: 20px;
}

.Whatsnew-types li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    background: rgba(11, 9, 32, 0.55);
    font-size: 0.9rem;
}

.Whatsnew-types code {
    color: hsl(26, 100%, 74%);
    font-weight: 600;
}

.Whatsnew-types span {
    overflow: hidden;
    color: var(--docs-muted);
    font-family: Consolas, "Cascadia Code", monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Code example */

.Whatsnew-code {
    margin: 0;
    border: 1px solid var(--docs-line-strong);
    border-radius: 20px;
    background: #0d0b24;
    overflow: hidden;
}

.Whatsnew-code figcaption {
    padding: 0.7rem 1.1rem;
    border-bottom: 1px solid var(--docs-line);
    color: var(--docs-muted);
    font-family: Consolas, "Cascadia Code", monospace;
    font-size: 0.8rem;
}

.Whatsnew-code pre {
    margin: 0;
    padding: 1.1rem 1.25rem;
    overflow-x: auto;
    color: #dcd8f5;
    font-size: 0.88rem;
    line-height: 1.7;
}

.Whatsnew-code .k { color: #ff7aa5; }
.Whatsnew-code .f { color: #ffc58f; }
.Whatsnew-code .p { color: #9ee6b5; }

/* Webhook delivery log */

.Whatsnew-log {
    padding: 1.25rem;
    background: var(--card-gradient);
    border: 1px solid var(--docs-line-strong);
    border-radius: 20px;
}

.Whatsnew-logTitle {
    margin: 0 0 0.75rem;
    color: var(--docs-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.Whatsnew-log ol {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.Whatsnew-log li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    background: rgba(11, 9, 32, 0.55);
    font-size: 0.9rem;
}

.Whatsnew-log code {
    color: var(--docs-text);
}

.Whatsnew-log li > span:last-child {
    color: var(--docs-muted);
    font-size: 0.82rem;
}

.Whatsnew-status {
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-family: Consolas, "Cascadia Code", monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

.Whatsnew-status[data-ok="true"] {
    background: hsla(140, 66%, 64%, 0.15);
    color: hsl(140, 66%, 70%);
}

.Whatsnew-status[data-ok="false"] {
    background: hsla(356, 82%, 59%, 0.15);
    color: hsl(356, 90%, 74%);
}

/* Card grids */

.Whatsnew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.Whatsnew-grid--four {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.Whatsnew-cardTitle {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.Whatsnew-grid .Lib-text {
    margin: 0;
}

.Whatsnew-small {
    margin: 0.75rem 0 0;
    color: var(--docs-muted);
    font-size: 0.88rem;
}

/* Plans table */

.Whatsnew-tableWrap {
    overflow-x: auto;
    border: 1px solid var(--docs-line-strong);
    border-radius: 20px;
    background: var(--card-gradient);
}

.Whatsnew-table {
    width: 100%;
    min-width: 36rem;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.Whatsnew-table th,
.Whatsnew-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--docs-line);
    text-align: center;
}

.Whatsnew-table tbody tr:last-child th,
.Whatsnew-table tbody tr:last-child td {
    border-bottom: 0;
}

.Whatsnew-table thead th {
    color: var(--docs-text);
    font-size: 1rem;
}

.Whatsnew-table tbody th {
    color: var(--docs-muted);
    font-weight: 500;
    text-align: left;
}

.Whatsnew-table td.yes {
    color: hsl(140, 66%, 70%);
    font-weight: 600;
}

/* Upgrading */

.Whatsnew-upgrade {
    border-color: hsla(26, 100%, 68%, 0.35);
}

.Whatsnew-upgrade .Whatsnew-groupTitle {
    margin-bottom: 0;
}

.Whatsnew-upgrade .Lib-features strong {
    color: var(--docs-text);
}

/* Closing call to action */

.Whatsnew-cta {
    padding: 3rem 1.5rem;
    border: 1px solid var(--docs-line-strong);
    border-radius: 25px;
    background:
        radial-gradient(closest-side at 20% 30%, rgba(154, 119, 207, 0.25), transparent),
        radial-gradient(closest-side at 85% 70%, rgba(236, 65, 119, 0.18), transparent),
        var(--card-gradient);
    text-align: center;
}

.Whatsnew-cta h2 {
    margin: 0 0 0.75rem;
}

.Whatsnew-cta p {
    max-width: 38rem;
    margin: 0 auto;
    color: var(--docs-muted);
    line-height: 1.6;
}

.Whatsnew-cta .Whatsnew-actions {
    justify-content: center;
}
