/**
 * Panda rules page — document and print presentation.
 */

.panda-rules-page {
    min-height: 100vh;
    padding: 8.75rem 1.5rem 5rem;
    background:
        radial-gradient(circle at 15% 5%, rgba(124, 58, 237, 0.08), transparent 26rem),
        #f1f5f9;
}

.panda-rules-shell {
    width: min(100%, 62rem);
    margin: 0 auto;
}

.panda-rules-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panda-rules-toolbar-bottom {
    margin: 1rem 0 0;
}

.panda-rules-toolbar p,
.panda-rules-toolbar a {
    margin: 0;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 700;
}

.panda-rules-toolbar a:hover {
    color: var(--color-primary-from);
}

.panda-print-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 2.875rem;
    padding: 0.7rem 1.1rem;
    border: 0;
    border-radius: 0.625rem;
    background: var(--color-primary-gradient);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.22);
    color: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panda-print-button:hover {
    box-shadow: 0 11px 25px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

.panda-print-button:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.28);
    outline-offset: 3px;
}

.panda-print-button svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.panda-rules-document {
    box-sizing: border-box;
    width: 100%;
    padding: clamp(2rem, 7vw, 4.5rem);
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
    color: #292929;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.075rem;
    line-height: 1.52;
}

.panda-rules-document p {
    margin: 0;
}

.panda-rules-section {
    padding: 0;
}

/* Generic content created with the WordPress editor. */
.panda-docs-page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.panda-docs-page-header h1 {
    margin: 0;
    color: #292929;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.panda-docs-content > *:first-child {
    margin-top: 0;
}

.panda-docs-content > p + p,
.panda-docs-content > p + ul,
.panda-docs-content > p + ol,
.panda-docs-content > ul + p,
.panda-docs-content > ol + p {
    margin-top: 0.7rem;
}

.panda-docs-content > h2,
.panda-docs-content > h3,
.panda-docs-content > h4 {
    color: #292929;
    font-family: "Times New Roman", Times, serif;
    font-weight: 700;
}

.panda-docs-content > h2 {
    margin: 3.2rem 0 1.1rem;
    font-size: 1.25em;
    line-height: 1.25;
    text-align: center;
}

.panda-docs-content > h3 {
    margin: 1.45rem 0 0.15rem;
    font-size: 1em;
    line-height: inherit;
}

.panda-docs-content > h4 {
    margin: 1.2rem 0 0.15rem;
    font-size: 1em;
    line-height: inherit;
}

.panda-docs-content > ul:not(.panda-rules-dash-list):not(.panda-rules-detail-list),
.panda-docs-content > ol:not(.panda-rules-underlined-list) {
    padding-left: 2.5rem;
}

.panda-docs-content > ul:not(.panda-rules-dash-list):not(.panda-rules-detail-list) {
    list-style: disc;
}

.panda-docs-content > ol:not(.panda-rules-underlined-list) {
    list-style: decimal;
}

.panda-docs-content blockquote {
    margin: 1.25rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid #292929;
    font-style: italic;
}

.panda-docs-content img {
    max-width: 100%;
    height: auto;
}

.panda-docs-content table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
}

.panda-docs-content th,
.panda-docs-content td {
    padding: 0.5rem;
    border: 1px solid #777;
    vertical-align: top;
}

.panda-docs-content .has-text-align-center {
    text-align: center;
}

.panda-docs-content .has-text-align-right {
    text-align: right;
}

.panda-rules-masthead {
    text-align: center;
}

.panda-rules-country {
    font-size: 1.05em;
    line-height: 1.45;
}

.panda-rules-date {
    margin-top: 2rem !important;
    padding-left: 28%;
}

.panda-rules-masthead h1 {
    margin: 3.25rem 0 0;
    color: #292929;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
}

.panda-rules-subtitle {
    margin-top: 0.35rem !important;
    font-size: clamp(1rem, 2.5vw, 1.22rem);
    line-height: 1.35;
}

.panda-rules-section h2 {
    margin: 3.2rem 0 1.1rem;
    color: #292929;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.25em;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.panda-rules-section h3 {
    margin: 1.45rem 0 0.15rem;
    color: #292929;
    font-family: "Times New Roman", Times, serif;
    font-size: 1em;
    font-weight: 700;
    line-height: inherit;
}

.panda-rules-document ul,
.panda-rules-document ol {
    margin: 0;
}

.panda-rules-dash-list {
    padding: 0;
    list-style: none;
}

.panda-rules-dash-list > li {
    position: relative;
    padding-left: 0.9em;
}

.panda-rules-dash-list > li::before {
    content: "-";
    position: absolute;
    left: 0;
}

.panda-rules-detail-list,
.panda-rules-underlined-list {
    padding-left: 2.5rem;
}

.panda-rules-underlined-list {
    margin: 0.15rem 0 0.25rem !important;
}

.panda-rules-underlined-list li,
.panda-rules-detail-list li {
    padding-left: 0.15rem;
}

.panda-rules-underlined-list li {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.panda-rules-signature {
    display: flex;
    justify-content: flex-end;
    margin-top: 2.5rem;
    text-align: center;
}

.panda-rules-signature > div {
    width: min(100%, 24rem);
}

.panda-rules-signature img {
    display: block;
    width: 13.9rem;
    max-width: 75%;
    height: auto;
    margin: 0.35rem auto -0.15rem;
}

@media (max-width: 640px) {
    .panda-rules-page {
        padding: 7.5rem 0 3rem;
    }
    .panda-rules-shell {
    width: min(100%, 62rem);
    margin: 0 auto;
    padding: 0 5px !important;
}
    .panda-rules-toolbar {
        padding: 0 1rem;
    }

    .panda-rules-toolbar p {
        display: none;
    }

    .panda-rules-toolbar-top {
        justify-content: flex-end;
    }

    .panda-rules-toolbar-bottom {
        justify-content: space-between;
    }

    .panda-rules-document {
        padding: 2rem 1.25rem 2.5rem;
        border-right: 0;
        border-left: 0;
        font-size: 1rem;
        line-height: 1.5;
    }

    .panda-rules-date {
        padding-left: 0;
        text-align: right;
    }

    .panda-rules-masthead h1 {
        margin-top: 2.75rem;
    }

    .panda-docs-page-header {
        margin-bottom: 2.5rem;
    }

    .panda-rules-section h2 {
        margin-top: 2.65rem;
    }

    .panda-rules-detail-list,
    .panda-rules-underlined-list {
        padding-left: 1.8rem;
    }
}

@page {
    size: A4 portrait;
    margin: 17mm;
}

@media print {
    html,
    body {
        background: #fff !important;
    }

    body {
        color: #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body > #main-header,
    body > footer,
    .panda-rules-toolbar {
        display: none !important;
    }

    .panda-rules-page {
        min-height: 0;
        padding: 0;
        background: #fff;
    }

    .panda-rules-shell {
        width: 100%;
        max-width: none;
    }

    .panda-rules-document {
        width: 100%;
        padding: 0;
        border: 0;
        box-shadow: none;
        color: #000;
        font-size: 12pt;
        line-height: 1.35;
    }

    .panda-rules-masthead h1,
    .panda-docs-page-header h1,
    .panda-rules-subtitle,
    .panda-rules-section h2,
    .panda-rules-section h3 {
        color: #000;
    }

    .panda-rules-section h2,
    .panda-rules-section h3,
    .panda-rules-signature {
        break-after: avoid;
        page-break-after: avoid;
    }

    .panda-rules-document li,
    .panda-rules-signature {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .panda-rules-country {
        font-size: 12pt;
    }

    .panda-rules-masthead h1 {
        font-size: 16pt;
    }

    .panda-docs-page-header h1 {
        font-size: 16pt;
    }

    .panda-rules-subtitle,
    .panda-rules-section h2 {
        font-size: 12pt;
    }
}
