/**
 * Changelog shortcodes — YOOPixel portal dashboard look (.yoo-dashboard / .yoo-section / .yoo-table)
 * + portal-style modal for long release notes. Scoped under .yoopxl-changelog-portal.
 */

.yoopxl-changelog-portal {
    --yoo-primary: #eeb44e;
    --yoo-primary-dark: #d49e2f;
    --yoo-gray-50: #f8fafc;
    --yoo-gray-100: #e5e7eb;
    --yoo-gray-600: #64748b;
    --yoo-gray-900: #5a5a59;
    --yoo-radius: 12px;
    --yoo-transition: all 0.2s ease;
    --yoo-table-sep: rgba(15, 23, 42, 0.06);
}

body.yoopxl-cl-modal-open {
    overflow: hidden !important;
}

/* Dashboard column + section (matches portal dashboard cards) */
.yoopxl-changelog-portal.yoo-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

/*
 * Break out of narrow .entry-content / theme columns so width matches the viewport band (like the header).
 * Inner card (.yoo-section) still uses max-width for readable line length on huge screens.
 */
.yoopxl-changelog-portal.yoopxl-changelog-wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 2em;
    margin-bottom: 2em;
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
    box-sizing: border-box;
    position: relative;
    left: auto;
    right: auto;
}

.yoopxl-changelog-portal .yoo-dash-col.yoo-section.yoopxl-changelog-section,
.yoopxl-changelog-portal .yoopxl-changelog-section.yoo-section {
    background: #fff;
    border-radius: var(--yoo-radius);
    padding: 28px 32px;
    border: 1px solid var(--yoo-gray-100);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.05);
    width: 100%;
    max-width: min(1270px, 100%);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    margin-bottom: 0;
}

.yoopxl-changelog-portal .yoo-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.yoopxl-changelog-portal .yoo-section-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--yoo-gray-900);
}

/* Description + Report bug: same row — grid keeps text + button side by side (flex had bad basis min(0,42em) → 0) */
.yoopxl-changelog-desc-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 20px;
    row-gap: 12px;
    margin: 0 0 22px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--yoo-gray-100);
}

.yoopxl-changelog-desc-bar--actions-only {
    grid-template-columns: 1fr;
    justify-items: end;
}

.yoopxl-changelog-desc-bar .yoopxl-changelog-product-desc {
    margin: 0;
    padding: 0;
    border: none;
    min-width: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #374151;
}

.yoopxl-changelog-desc-report {
    justify-self: end;
    align-self: start;
}

@media (max-width: 640px) {
    .yoopxl-changelog-desc-bar {
        grid-template-columns: 1fr;
    }

    .yoopxl-changelog-desc-report {
        justify-self: end;
    }
}

/* Tab panels: table lives inside one outer section; inner body has no second card */
.yoopxl-changelog-portal .yoopxl-changelog-panel-body {
    max-width: 100%;
    box-sizing: border-box;
}

.yoopxl-changelog-portal .yoopxl-changelog-tabs-section .yoopxl-changelog-tablist {
    margin-top: 0;
}

.yoopxl-changelog-portal .yoopxl-changelog-tabs-section > .yoopxl-changelog-tabpanel {
    margin-top: 0;
}

.yoopxl-changelog-product-desc p:first-child {
    margin-top: 0;
}

.yoopxl-changelog-product-desc p:last-child {
    margin-bottom: 0;
}

.yoopxl-changelog-portal .yoopxl-changelog-error,
.yoopxl-changelog-portal .yoopxl-changelog-empty {
    margin: 0;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--yoo-gray-600);
}

.yoopxl-changelog-portal .yoopxl-changelog-error {
    color: #d63638;
    background: #fff5f5;
    border: 1px solid rgba(214, 54, 56, 0.2);
    border-radius: var(--yoo-radius);
}

/* Table wrapper + yoo-table (portal licenses style) */
.yoopxl-changelog-portal .yoo-licenses-table-wrapper.yoopxl-changelog-table-outer {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--yoo-gray-100) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    min-width: 560px;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table thead {
    background: #f9fafb;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 500;
    color: #64748b;
    font-size: 14px;
    border-right: 1px solid var(--yoo-table-sep);
    white-space: nowrap;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table th:last-child {
    border-right: none;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table tbody tr:nth-child(odd) {
    background-color: #fff;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table tbody tr:nth-child(even) {
    background-color: #fbfdff;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table tbody tr:hover {
    background-color: #f3f4f6;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table td {
    padding: 20px 24px;
    font-size: 14px;
    color: #1e293b;
    vertical-align: top;
    border-right: 1px solid var(--yoo-table-sep);
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table td:last-child {
    border-right: none;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table tbody tr:last-child td {
    padding-bottom: 20px !important;
}

.yoopxl-changelog-portal .yoopxl-col-version {
    width: 22%;
    min-width: 12em;
    white-space: normal;
}

.yoopxl-changelog-portal .yoopxl-col-version-row {
    display: block;
}

.yoopxl-changelog-portal .yoopxl-col-version-text {
    min-width: 0;
}

.yoopxl-changelog-portal .yoopxl-col-notes .yoopxl-changelog-first-release-wrap {
    margin-bottom: 8px;
}

.yoopxl-changelog-portal .yoopxl-col-notes .yoopxl-changelog-first-release-wrap .yoopxl-changelog-first-release {
    margin-top: 0;
}

.yoopxl-changelog-portal .yoopxl-col-version strong {
    font-weight: 600;
    font-size: 15px;
    color: var(--yoo-gray-900);
    display: block;
}

.yoopxl-changelog-portal .yoo-table .yoo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: none;
    margin-top: 0;
}

.yoopxl-changelog-portal .yoo-table .yoo-badge-confirmed {
    background: #e0f2f1;
    color: #046c4e;
}

/* Report bug — brand primary #EEB44E (portal --yoo-primary) */
.yoopxl-changelog-portal a.yoopxl-cl-report-bug.yoopxl-cl-report-bug-ticket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    text-decoration: none;
    background: var(--yoo-primary);
    border: none;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    white-space: nowrap;
    transition: var(--yoo-transition);
}

.yoopxl-changelog-portal a.yoopxl-cl-report-bug.yoopxl-cl-report-bug-ticket:hover {
    background: var(--yoo-primary-dark);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(238, 180, 78, 0.45);
    transform: translateY(-1px);
}

.yoopxl-changelog-portal a.yoopxl-cl-report-bug-ticket .yoopxl-cl-report-bug-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.yoopxl-changelog-portal a.yoopxl-cl-report-bug-ticket .yoopxl-cl-report-bug-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.yoopxl-changelog-portal .yoopxl-col-date,
.yoopxl-changelog-portal .yoopxl-col-variant {
    width: 1%;
    white-space: nowrap;
    color: var(--yoo-gray-600);
}

.yoopxl-changelog-portal .yoopxl-col-notes {
    min-width: min(40vw, 280px);
    width: auto;
    text-align: start !important;
}

.yoopxl-changelog-portal .yoopxl-changelog-muted {
    color: #94a3b8;
}

/* Readable measure for prose blocks outside the changelog table only */
.yoopxl-changelog-portal .yoopxl-changelog-body {
    max-width: 56em;
    color: #1e293b;
}

/* Inside the table “Changes” column, use the full cell width (56em left a large empty band). */
.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table .yoopxl-col-notes .yoopxl-changelog-body,
.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table .yoopxl-col-notes .yoopxl-changelog-body p,
.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table .yoopxl-col-notes .yoopxl-changelog-body li,
.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table .yoopxl-col-notes .yoopxl-cl-notes-excerpt {
    max-width: none !important;
    box-sizing: border-box;
}

.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table .yoopxl-col-notes .yoopxl-changelog-body,
.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table .yoopxl-col-notes .yoopxl-changelog-body ul,
.yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table .yoopxl-col-notes .yoopxl-changelog-body ol {
    width: 100%;
}

.yoopxl-changelog-portal .yoopxl-changelog-body p:first-child {
    margin-top: 0;
}

.yoopxl-changelog-portal .yoopxl-changelog-body p:last-child {
    margin-bottom: 0;
}

.yoopxl-changelog-portal .yoopxl-changelog-body ul,
.yoopxl-changelog-portal .yoopxl-changelog-body ol {
    margin: 0.4em 0 0.4em 1.2em;
    padding: 0;
}

.yoopxl-changelog-portal .yoopxl-changelog-body li {
    margin: 0.2em 0;
}

/* Excerpt + expand — stretch on cross-axis so text uses full td width (flex-start was shrink-to-content). */
.yoopxl-changelog-portal .yoopxl-cl-notes-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.yoopxl-changelog-portal .yoopxl-cl-notes-cell .yoo-btn {
    align-self: flex-start;
    margin-top: 4px;
}

.yoopxl-changelog-portal .yoopxl-cl-notes-excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: #1e293b;
    margin-bottom: 10px;
    text-align: start !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
    white-space: pre-line;
    overflow-wrap: break-word;
}

.yoopxl-changelog-portal .yoo-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--yoo-radius);
    font-weight: 500;
    text-decoration: none;
    transition: var(--yoo-transition);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
}

.yoopxl-changelog-portal .yoo-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.yoopxl-changelog-portal .yoo-btn-ghost {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    color: #6b7280 !important;
}

.yoopxl-changelog-portal .yoo-btn-ghost:hover {
    border-color: #9ca3af !important;
    color: #374151 !important;
}

/* Modal — same structure as portal licenses / billing */
.yoopxl-changelog-portal .yoopxl-cl-modal.yoo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.yoopxl-changelog-portal .yoopxl-cl-modal.yoo-modal-overlay[hidden] {
    display: none !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-box.yoo-modal-wide {
    max-width: 640px;
    overflow: hidden;
}

.yoopxl-changelog-portal .yoopxl-cl-modal-x {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 3;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    border-radius: 6px;
}

.yoopxl-changelog-portal .yoopxl-cl-modal-x:hover {
    background: rgba(255, 255, 255, 0.12);
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 44px 18px 22px;
    background: #5a5a59;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-icon {
    color: #eeb44e;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-body.yoopxl-cl-modal-scroll {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 20px 22px;
    -webkit-overflow-scrolling: touch;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body {
    max-width: none;
}

/* “View full changelog” modal: neutralize theme .entry-content giant headings / lists */
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body {
    font-size: 15px;
    line-height: 1.65;
    color: #1e293b;
    text-align: start;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body {
    font-size: 15px !important;
    line-height: 1.65 !important;
    font-weight: 400 !important;
    color: #1e293b !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body p {
    margin: 0 0 0.75em !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    font-weight: 400 !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body p:last-child {
    margin-bottom: 0 !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h1,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h2,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h3,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h4,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h5,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h6 {
    margin: 0.85em 0 0.4em !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #0f172a !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h1 {
    font-size: 1.25rem !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h2 {
    font-size: 1.15rem !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h3 {
    font-size: 1.08rem !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h4,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h5,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body h6 {
    font-size: 1rem !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body ul,
.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body ol {
    margin: 0.4em 0 0.75em !important;
    padding-inline-start: 1.35em !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body li {
    margin: 0.25em 0 !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoopxl-cl-modal-body .yoopxl-changelog-body a {
    font-size: inherit !important;
    line-height: inherit !important;
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-box.yoo-modal-wide {
    max-width: min(92vw, 720px);
}

.yoopxl-changelog-portal .yoopxl-cl-modal .yoo-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    background: #f9f9f8;
    border-top: 1px solid #f0ece4;
}

/* Tabs (same root uses .yoopxl-changelog-wrap for portal width) */
.yoopxl-changelog-portal .yoopxl-changelog-tablist {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    margin: 0 0 20px;
    padding: 0;
    border-bottom: 1px solid var(--yoo-gray-100);
    box-shadow: 0 12px 24px -12px rgba(17, 24, 39, 0.08);
}

.yoopxl-changelog-portal .yoopxl-changelog-tab {
    margin: 0;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--yoo-gray-900);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--yoo-transition);
    font-family: inherit;
}

.yoopxl-changelog-portal .yoopxl-changelog-tab:hover {
    color: var(--yoo-primary);
}

.yoopxl-changelog-portal .yoopxl-changelog-tab.is-active {
    color: var(--yoo-primary);
    border-bottom-color: var(--yoo-primary);
    font-weight: 600;
}

.yoopxl-changelog-portal .yoopxl-changelog-tab:focus {
    outline: 2px solid var(--yoo-primary);
    outline-offset: 2px;
}

.yoopxl-changelog-portal .yoopxl-changelog-tab:focus:not(:focus-visible) {
    outline: none;
}

.yoopxl-changelog-portal .yoopxl-changelog-tabpanel .yoopxl-changelog-section,
.yoopxl-changelog-portal .yoopxl-changelog-tabpanel .yoopxl-changelog-panel-body {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.yoopxl-changelog-portal .yoopxl-changelog-tabpanel[hidden] {
    display: none !important;
}

@media (max-width: 782px) {
    .yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table th,
    .yoopxl-changelog-portal .yoo-table.yoopxl-changelog-yoo-table td {
        padding: 14px 16px;
    }

    .yoopxl-changelog-portal .yoopxl-changelog-tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 12px 14px;
    }
}

/* Merged release range (v1.0.8 – v1.0.14) in changelog title */
.yoopxl-changelog-portal .yoopxl-changelog-merged-range {
    font-weight: 600;
    color: var(--yoo-gray-900);
}
