/* Public policy pages: Privacy, Terms & Conditions, Cookie, Refund
   (resources/views/frontend/partials/policy-page.blade.php).
   Banner matches the Blog & Articles page: navy #003557, red accent #f74254. */

.policyx-page {
    margin-top: 80px;
    background: #f8fafc;
    color: #1f2a37;
}

/* banner */

.policyx-banner {
    background: #003557 no-repeat center center;
    background-size: cover;
    padding: 56px 0;
    text-align: center;
}

.policyx-banner h1 {
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 12px;
}

.policyx-crumbs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    color: #e6eef5;
}

.policyx-crumbs li + li::before {
    content: "/";
    margin-right: 8px;
    color: #9fb4c7;
}

.policyx-crumbs a {
    color: #e6eef5;
    text-decoration: none;
}

.policyx-crumbs a:hover {
    color: #fff;
    text-decoration: underline;
}

/* content card */

.policyx-body {
    padding: 48px 0 72px;
}

.policyx-card {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 56px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 53, 87, 0.06);
}

.policyx-updated {
    margin: 0 0 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #5e6c7a;
}

.policyx-empty {
    margin: 0;
    color: #5e6c7a;
    text-align: center;
}

/* rich text from the admin editor */

.policyx-content {
    font-size: 16px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.policyx-content h1,
.policyx-content h2,
.policyx-content h3,
.policyx-content h4,
.policyx-content h5,
.policyx-content h6 {
    color: #003557;
    line-height: 1.3;
    margin: 32px 0 12px;
    /* same as the editor: bold headings. !important because the site theme sets
       headings to a normal weight, which made them look different from the editor */
    font-weight: 700 !important;
    letter-spacing: normal;
    text-transform: none;
}

/* sizes and colours match the admin editor (policy/partials/form.blade.php) */
.policyx-content h1 { font-size: 26px; }
.policyx-content h2 { font-size: 23px; margin-top: 40px; margin-bottom: 14px; }
.policyx-content h3 { font-size: 18px; margin: 26px 0 10px; color: #0f4679; }
.policyx-content h4,
.policyx-content h5,
.policyx-content h6 { font-size: 16px; margin: 20px 0 8px; }

.policyx-content > :first-child {
    margin-top: 0;
}

.policyx-content p {
    margin: 0 0 16px;
}

.policyx-content ul,
.policyx-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.policyx-content ul li {
    list-style-type: disc !important;
}

.policyx-content ol li {
    list-style-type: decimal !important;
}

.policyx-content li {
    margin-bottom: 6px;
}

.policyx-content a {
    color: #f74254;
    text-decoration: underline;
}

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

/* tables (typed in the editor or made with "Create table with AI") */

.policyx-content table {
    width: 100%;
    margin: 16px 0 24px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
}

/* !important: tables made with the editor's table button are saved with Bootstrap's
   "table table-bordered" classes, and the site CSS for .table paints those cells
   white-on-white and centred. These rules must win whatever class a table has. */
.policyx-content table th,
.policyx-content table td {
    padding: 10px 14px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #334155 !important;
    text-align: left !important;
    vertical-align: top !important;
}

.policyx-content table th,
.policyx-content table thead td,
.policyx-content table:not(:has(thead)) tr:first-child td {
    background-color: #003557 !important;
    border-color: #003557 !important;
    color: #fff !important;
    font-weight: 600;
}

.policyx-content table tbody tr:nth-child(even) td {
    background-color: #f8fafc !important;
}

.policyx-content table tbody td:first-child {
    color: #003557 !important;
    font-weight: 500;
}

/* a header row that is the first <tr> of a table without <thead> keeps its white text */
.policyx-content table:not(:has(thead)) tr:first-child td:first-child {
    color: #fff !important;
}

.policyx-content .table-responsive {
    margin: 16px 0 24px;
    overflow-x: auto;
}

.policyx-content .table-responsive table {
    margin: 0;
}

/* quotes (typed in the editor or imported from Word / PDF) */

.policyx-content blockquote {
    margin: 20px 0;
    padding: 16px 22px;
    background: #f8fafc;
    border-left: 4px solid #f74254;
    border-radius: 0 8px 8px 0;
    color: #1f2a37;
    font-style: italic;
}

.policyx-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Security Whitepaper blocks (intro line, contents box, KEY / INFO notes) */

.policyx-content [id] {
    scroll-margin-top: 110px;
}

.policyx-content h2 {
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.policyx-content .wp-intro {
    font-size: 17px;
    color: #5e6c7a;
}

.policyx-content .wp-toc {
    margin: 24px 0 8px;
    padding: 20px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.policyx-content .wp-toc p {
    margin-bottom: 8px;
    color: #003557;
    font-weight: 700;
}

.policyx-content .wp-toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 32px;
}

.policyx-content .wp-toc li {
    break-inside: avoid;
    margin-bottom: 4px;
}

.policyx-content .wp-toc a {
    color: #003557;
    text-decoration: none;
}

.policyx-content .wp-toc a:hover {
    color: #f74254;
    text-decoration: underline;
}

.policyx-content .wp-note {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 20px 0;
    padding: 16px 20px;
    background: #f1f5f9;
    border-left: 4px solid #003557;
    border-radius: 8px;
}

.policyx-content .wp-note b {
    flex: none;
    padding-top: 3px;
    color: #003557;
    font-size: 12px;
    letter-spacing: 0.1em;
}

.policyx-content .wp-note p {
    margin: 0;
}

@media (max-width: 767px) {
    /* wide tables scroll sideways instead of squashing the text */
    .policyx-content table {
        display: block;
        overflow-x: auto;
    }

    .policyx-content .wp-toc ol {
        columns: 1;
    }

    .policyx-banner {
        padding: 40px 0;
    }

    .policyx-banner h1 {
        font-size: 28px;
    }

    .policyx-body {
        padding: 24px 0 48px;
    }

    .policyx-card {
        padding: 28px 20px;
        border-radius: 10px;
    }
}
