/* =========================================================
   WebCOSS Legal Centre
   Shared styles for Terms, Privacy, Cookie Notice and DPA
   ========================================================= */

.legal-page {
    --legal-navy: #061a42;
    --legal-navy-2: #0a2b66;
    --legal-blue: #4c9cff;
    --legal-blue-soft: #eaf3ff;
    --legal-cyan: #83d7ff;
    --legal-ink: #10233f;
    --legal-muted: #65748b;
    --legal-line: #dce6f3;
    --legal-surface: #ffffff;
    --legal-bg: #f4f8fe;
    --legal-success: #21b684;
    --legal-shadow: 0 24px 70px rgba(8, 32, 74, 0.12);
    background: var(--legal-bg);
    color: var(--legal-ink);
    position: relative;
    isolation: isolate;
}

.legal-page *,
.legal-page *::before,
.legal-page *::after {
    box-sizing: border-box;
}

.legal-reading-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 9999;
    height: 4px;
    pointer-events: none;
    background: transparent;
}

.legal-reading-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #6bb9ff, #85e4ff);
    box-shadow: 0 0 18px rgba(107, 185, 255, 0.65);
    transition: width 0.08s linear;
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 155px 0 92px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(95, 172, 255, 0.22), transparent 29%),
        radial-gradient(circle at 12% 88%, rgba(89, 224, 255, 0.13), transparent 31%),
        linear-gradient(135deg, #041538 0%, #08265c 54%, #0b3474 100%);
}

.legal-hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 95%);
}

.legal-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(1px);
    pointer-events: none;
}

.legal-orb-one {
    width: 340px;
    height: 340px;
    right: -110px;
    top: 70px;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: inset 0 0 90px rgba(88, 170, 255, .08);
}

.legal-orb-two {
    width: 210px;
    height: 210px;
    left: -80px;
    bottom: -105px;
    background: rgba(81, 203, 255, .08);
    border: 1px solid rgba(255,255,255,.1);
}

.legal-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
    color: rgba(255,255,255,.68);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
}

.legal-breadcrumb a,
.legal-breadcrumb span,
.legal-breadcrumb i {
    color: inherit;
}

.legal-breadcrumb a:hover {
    color: #fff;
}

.legal-breadcrumb i {
    font-size: 9px;
    opacity: .62;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: #dff3ff;
    background: rgba(255,255,255,.07);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.legal-eyebrow i {
    color: #87dcff;
}

.legal-hero h1 {
    max-width: 900px;
    margin: 0 0 20px;
    color: #fff !important;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.legal-hero-copy {
    max-width: 800px;
    margin: 0;
    color: rgba(239, 247, 255, .78) !important;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.7;
}

.legal-meta-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.legal-meta-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.055);
    font-size: 12px;
    font-weight: 700;
}

.legal-meta-list i {
    color: #80d5ff;
}

.legal-hero-status {
    position: relative;
    padding: 25px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 24px;
    background: rgba(255,255,255,.09);
    box-shadow: 0 26px 60px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.1);
    backdrop-filter: blur(18px);
}

.legal-hero-status::after {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    right: -50px;
    bottom: -60px;
    border-radius: 50%;
    background: rgba(104, 198, 255, .12);
}

.legal-status-top {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 17px;
    color: #cbeaff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.legal-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #54e3aa;
    box-shadow: 0 0 0 6px rgba(84, 227, 170, .12);
}

.legal-hero-status strong {
    display: block;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    color: #fff;
    font-size: 19px;
    line-height: 1.45;
}

.legal-hero-status p {
    position: relative;
    z-index: 1;
    margin: 0 0 20px;
    color: rgba(255,255,255,.68) !important;
    font-size: 14px;
    line-height: 1.65;
}

.legal-status-link {
    display: inline-flex;
    position: relative;
    z-index: 1;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.legal-status-link i {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: var(--legal-navy);
    background: #8edcff;
    transition: transform .2s ease;
}

.legal-status-link:hover {
    color: #fff;
}

.legal-status-link:hover i {
    transform: translateY(3px);
}

.legal-content-area {
    position: relative;
    padding: 0 0 120px;
}

.legal-summary-grid {
    display: grid;
    position: relative;
    z-index: 3;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: -38px 0 36px;
}

.legal-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 148px;
    padding: 24px;
    border: 1px solid rgba(215, 227, 241, .95);
    border-radius: 20px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 50px rgba(12, 40, 84, .09);
    backdrop-filter: blur(12px);
}

.legal-summary-number {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #1d66ba;
    background: var(--legal-blue-soft);
    font-size: 12px;
    font-weight: 900;
}

.legal-summary-card h2 {
    margin: 1px 0 7px;
    color: var(--legal-ink) !important;
    font-size: 17px;
    line-height: 1.35;
}

.legal-summary-card p {
    margin: 0;
    color: var(--legal-muted) !important;
    font-size: 13px;
    line-height: 1.65;
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(250px, 305px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.legal-sidebar {
    position: sticky;
    top: 100px;
}

.legal-sidebar-card {
    overflow: hidden;
    border: 1px solid var(--legal-line);
    border-radius: 22px;
    background: var(--legal-surface);
    box-shadow: 0 18px 52px rgba(12, 40, 84, .08);
}

.legal-sidebar-heading {
    padding: 22px 22px 16px;
}

.legal-sidebar-heading span {
    display: block;
    margin-bottom: 3px;
    color: #7390b3;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.legal-sidebar-heading strong {
    color: var(--legal-ink);
    font-size: 19px;
}

.legal-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 8px;
    padding: 0 11px;
    border: 1px solid #dbe6f3;
    border-radius: 13px;
    background: #f7faff;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.legal-search-box:focus-within {
    border-color: #74b7ff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(76,156,255,.12);
}

.legal-search-box > i {
    color: #7f94ae;
    font-size: 13px;
}

.legal-search-box input {
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--legal-ink);
    background: transparent;
    font-size: 13px;
}

.legal-search-box input::placeholder {
    color: #93a2b7;
}

.legal-search-box button {
    display: none;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #71839b;
    background: #e8f0fa;
    cursor: pointer;
}

.legal-search-box.has-value button {
    display: grid;
    place-items: center;
}

.legal-search-status {
    min-height: 18px;
    margin: 0 19px 7px;
    color: #7d8da4 !important;
    font-size: 11px;
}

.legal-toc {
    max-height: min(52vh, 500px);
    padding: 5px 10px 12px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #c7d8ec transparent;
}

.legal-toc a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    align-items: start;
    padding: 9px 10px;
    border-radius: 10px;
    color: #61718a;
    font-size: 12px;
    line-height: 1.4;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.legal-toc a span {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    border-radius: 8px;
    color: #4b7eb8;
    background: #eef5fd;
    font-size: 9px;
    font-weight: 900;
}

.legal-toc a em {
    padding-top: 4px;
    overflow: hidden;
    font-style: normal;
    font-weight: 700;
    text-overflow: ellipsis;
}

.legal-toc a:hover,
.legal-toc a.is-active {
    color: #0a4f9f;
    background: #edf5ff;
    transform: translateX(2px);
}

.legal-toc a.is-active span {
    color: #fff;
    background: #2e86e7;
}

.legal-toc a.is-filtered-out {
    display: none;
}

.legal-sidebar-actions {
    display: grid;
    gap: 9px;
    padding: 16px;
    border-top: 1px solid #e7eef7;
    background: #fbfdff;
}

.legal-action-button {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid #d8e4f1;
    border-radius: 12px;
    color: #24466d;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.legal-action-button:hover {
    color: #0a4f9f;
    border-color: #87bdf8;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(29, 92, 160, .1);
}

.legal-action-button-primary,
.legal-action-button-primary:hover {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #277edc, #57a8ff);
}

.legal-document {
    min-width: 0;
}

.legal-notice-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid #cfe2fb;
    border-radius: 20px;
    background: linear-gradient(135deg, #edf6ff 0%, #f8fbff 100%);
}

.legal-notice-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #176dca;
    background: #dceeff;
}

.legal-notice-label {
    display: block;
    margin-bottom: 5px;
    color: #28679f;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.legal-notice-card p {
    margin: 0;
    color: #385571 !important;
    font-size: 14px;
    line-height: 1.75;
}

.legal-sections {
    display: grid;
    gap: 16px;
}

.legal-section {
    position: relative;
    scroll-margin-top: 118px;
    padding: 28px 30px;
    border: 1px solid var(--legal-line);
    border-radius: 22px;
    background: var(--legal-surface);
    box-shadow: 0 12px 35px rgba(12, 40, 84, .055);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.legal-section:hover {
    border-color: #c7dcf4;
    box-shadow: 0 20px 45px rgba(12, 40, 84, .085);
}

.legal-section.is-search-match {
    border-color: #6eaff3;
    box-shadow: 0 0 0 4px rgba(76,156,255,.1), 0 18px 45px rgba(12, 40, 84, .08);
}

.legal-section[hidden] {
    display: none !important;
}

.legal-section-featured {
    border-color: #c7e0fb;
    background:
        linear-gradient(135deg, rgba(236,246,255,.9), rgba(255,255,255,.98) 58%);
}

.legal-section-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 34px;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.legal-clause-number {
    width: 52px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #1d69bd;
    background: #eaf3fe;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .02em;
}

.legal-section-head h2 {
    margin: 0;
    color: var(--legal-ink) !important;
    font-size: clamp(20px, 2.4vw, 27px);
    line-height: 1.25;
    letter-spacing: -.025em;
}

.legal-copy-link {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d9e5f2;
    border-radius: 10px;
    color: #7890ad;
    background: #f8fbff;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}

.legal-section:hover .legal-copy-link,
.legal-copy-link:focus-visible {
    opacity: 1;
}

.legal-copy-link:hover,
.legal-copy-link.is-copied {
    color: #fff;
    border-color: #2f86e6;
    background: #2f86e6;
}

.legal-section-body {
    color: var(--legal-muted);
}

.legal-section-body p {
    margin: 0 0 15px;
    color: var(--legal-muted) !important;
    font-size: 15px;
    line-height: 1.9;
}

.legal-section-body p:last-child {
    margin-bottom: 0;
}

.legal-section-body strong {
    color: #203f64;
    font-weight: 800;
}

.legal-section-body a {
    color: #176fcf;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(23,111,207,.3);
    text-underline-offset: 3px;
}

.legal-section-body a:hover {
    color: #0b4e99;
}

.legal-contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.legal-contact-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #dfebf7;
    border-radius: 13px;
    background: #f7faff;
}

.legal-contact-label {
    color: #6b819d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.legal-contact-value {
    overflow-wrap: anywhere;
    color: #1d3b5e;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.legal-no-results {
    padding: 54px 25px;
    border: 1px dashed #bfd2e9;
    border-radius: 22px;
    background: #fff;
    text-align: center;
}

.legal-no-results i {
    margin-bottom: 15px;
    color: #7aaee6;
    font-size: 40px;
}

.legal-no-results h2 {
    margin: 0 0 8px;
    color: var(--legal-ink) !important;
    font-size: 22px;
}

.legal-no-results p {
    margin: 0;
    color: var(--legal-muted) !important;
}

.legal-related {
    margin-top: 30px;
    padding: 30px;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 92% 15%, rgba(102, 191, 255, .24), transparent 35%),
        linear-gradient(135deg, #061a42, #0a2e68);
    box-shadow: var(--legal-shadow);
}

.legal-related-head span {
    display: block;
    margin-bottom: 5px;
    color: #8fd8ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.legal-related-head h2 {
    margin: 0 0 20px;
    color: #fff !important;
    font-size: 25px;
}

.legal-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.legal-related-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    gap: 12px;
    align-items: center;
    min-height: 106px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    color: #fff;
    background: rgba(255,255,255,.065);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.legal-related-card:hover {
    color: #fff;
    border-color: rgba(126, 205, 255, .45);
    background: rgba(255,255,255,.11);
    transform: translateY(-3px);
}

.legal-related-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #7ed4ff;
    background: rgba(126,212,255,.12);
}

.legal-related-card strong,
.legal-related-card small {
    display: block;
}

.legal-related-card strong {
    margin-bottom: 5px;
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
}

.legal-related-card small {
    color: rgba(255,255,255,.63);
    font-size: 11px;
    line-height: 1.45;
}

.legal-related-card > i {
    color: rgba(255,255,255,.55);
    font-size: 12px;
}

.legal-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 120;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #267ddc, #5aaeff);
    box-shadow: 0 15px 35px rgba(24, 102, 190, .3);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
}

.legal-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 1199px) {
    .legal-hero {
        padding-top: 140px;
    }

    .legal-layout {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 20px;
    }

    .legal-section {
        padding: 25px;
    }

    .legal-related-grid {
        grid-template-columns: 1fr;
    }

    .legal-related-card {
        min-height: auto;
    }
}

@media (max-width: 991px) {
    .legal-hero {
        padding: 125px 0 78px;
    }

    .legal-hero-status {
        max-width: 600px;
    }

    .legal-summary-grid {
        grid-template-columns: 1fr;
        margin-top: -28px;
    }

    .legal-summary-card {
        min-height: auto;
    }

    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        position: static;
    }

    .legal-sidebar-card {
        display: grid;
        grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr);
        align-items: start;
    }

    .legal-sidebar-heading,
    .legal-search-box,
    .legal-search-status,
    .legal-sidebar-actions {
        grid-column: 1;
    }

    .legal-toc {
        grid-column: 2;
        grid-row: 1 / span 4;
        max-height: 290px;
        border-left: 1px solid #e5edf6;
    }
}

@media (max-width: 767px) {
    .legal-hero {
        padding: 110px 0 68px;
    }

    .legal-breadcrumb {
        margin-bottom: 25px;
    }

    .legal-hero h1 {
        font-size: clamp(36px, 11vw, 52px);
    }

    .legal-meta-list {
        align-items: stretch;
        flex-direction: column;
    }

    .legal-meta-list span {
        width: 100%;
    }

    .legal-content-area {
        padding-bottom: 85px;
    }

    .legal-summary-grid {
        gap: 12px;
    }

    .legal-sidebar-card {
        display: block;
    }

    .legal-toc {
        max-height: 310px;
        border-left: 0;
        border-top: 1px solid #e5edf6;
    }

    .legal-notice-card {
        padding: 19px;
    }

    .legal-section {
        padding: 22px 19px;
        border-radius: 18px;
    }

    .legal-section-head {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 11px;
    }

    .legal-clause-number {
        width: 44px;
        height: 39px;
    }

    .legal-copy-link {
        display: none;
    }

    .legal-section-body p {
        font-size: 14px;
        line-height: 1.82;
    }

    .legal-contact-list {
        grid-template-columns: 1fr;
    }

    .legal-related {
        padding: 24px 19px;
    }

    .legal-related-card {
        grid-template-columns: 38px minmax(0, 1fr) 18px;
    }

    .legal-back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .legal-summary-card {
        padding: 20px;
    }

    .legal-hero-status {
        padding: 21px;
    }

    .legal-notice-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-page *,
    .legal-page *::before,
    .legal-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .header-area,
    .footer-area,
    .legal-reading-progress,
    .legal-hero-status,
    .legal-summary-grid,
    .legal-sidebar,
    .legal-related,
    .legal-back-to-top,
    .legal-copy-link {
        display: none !important;
    }

    #smooth-wrapper,
    #smooth-content {
        transform: none !important;
        overflow: visible !important;
    }

    .legal-page,
    .legal-content-area {
        background: #fff !important;
    }

    .legal-hero {
        padding: 35px 0 25px;
        color: #000;
        background: #fff !important;
    }

    .legal-hero h1,
    .legal-hero-copy,
    .legal-breadcrumb,
    .legal-breadcrumb a,
    .legal-meta-list span,
    .legal-eyebrow {
        color: #000 !important;
    }

    .legal-layout {
        display: block;
    }

    .legal-section,
    .legal-notice-card {
        break-inside: avoid;
        box-shadow: none !important;
        border-color: #ccc !important;
    }
}
