/* ==========================================
   Novispry Legal Pages
========================================== */

.dashboard {
    min-height: 100vh;
}

.main.legal-page {
    display: block;

    width: calc(100% - 260px);
    max-width: none;
    min-width: 0;

    margin-left: 260px;
    padding: 34px 36px 0;

    box-sizing: border-box;
}


/* ==========================================
   Header
========================================== */

.legal-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;

    width: 100%;
    margin: 0 0 24px;
}

.legal-header-content {
    min-width: 0;
}

.legal-label {
    display: block;

    margin-bottom: 10px;

    color: #4f46e5;

    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.legal-header h1 {
    margin: 0 0 10px;

    color: #0f172a;

    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -1.4px;
}

.legal-header p {
    margin: 0;

    color: #64748b;

    font-size: 15px;
    line-height: 1.6;
}

.legal-updated {
    flex-shrink: 0;

    padding-bottom: 3px;

    color: #64748b;

    font-size: 13px;
    line-height: 1.5;
}


/* ==========================================
   Accordion Card
========================================== */

.legal-card {
    width: 100%;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 22px;

    padding: 8px 24px;

    box-sizing: border-box;

    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.06);
}

.legal-accordion {
    width: 100%;

    border-bottom: 1px solid #e8edf4;
}

.legal-accordion:last-child {
    border-bottom: none;
}


/* ==========================================
   Accordion Button
========================================== */

.legal-accordion-button {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 18px;

    width: 100%;
    min-height: 70px;

    margin: 0;
    padding: 10px 0;

    background: transparent;

    border: none;

    color: inherit;

    cursor: pointer;

    font-family: inherit;
    text-align: left;

    appearance: none;
    -webkit-appearance: none;
}

.legal-accordion-button:hover .legal-summary-text strong {
    color: #4f46e5;
}

.legal-accordion-button:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.25);
    outline-offset: 3px;
    border-radius: 14px;
}


/* ==========================================
   Accordion Number
========================================== */

.legal-number {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #ede9fe
        );

    color: #4f46e5;

    font-size: 16px;
    font-weight: 900;
}


/* ==========================================
   Accordion Heading
========================================== */

.legal-summary-text {
    display: block;
    min-width: 0;
}

.legal-summary-text strong {
    display: block;

    margin-bottom: 4px;

    color: #0f172a;

    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;

    transition: color 0.2s ease;
}

.legal-summary-text small {
    display: block;

    color: #64748b;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}


/* ==========================================
   Accordion Arrow
========================================== */

.legal-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    color: #475569;

    font-size: 20px;
    line-height: 1;

    transform: rotate(0deg);

    transition:
        transform 0.25s ease,
        color 0.2s ease;
}

.legal-accordion.is-open .legal-arrow {
    color: #4f46e5;
    transform: rotate(180deg);
}


/* ==========================================
   Accordion Open Content
========================================== */

.legal-content {
    display: grid;
    grid-template-rows: 0fr;

    opacity: 0;

    transition:
        grid-template-rows 0.28s ease,
        opacity 0.2s ease;
}

.legal-content-inner {
    min-height: 0;
    overflow: hidden;

    padding:
        0
        42px
        0
        64px;

    color: #475569;

    font-size: 14px;
    line-height: 1.75;

    box-sizing: border-box;

    transition: padding-bottom 0.28s ease;
}

.legal-accordion.is-open .legal-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

.legal-accordion.is-open .legal-content-inner {
    padding-bottom: 22px;
}

.legal-content-inner p {
    margin: 0 0 12px;
}

.legal-content-inner p:last-child {
    margin-bottom: 0;
}

.legal-content-inner strong {
    color: #0f172a;
}


/* ==========================================
   Footer
========================================== */

.legal-footer {
    display: grid;
    grid-template-columns: 1.35fr repeat(4, minmax(120px, 1fr));
    gap: 42px;

    width: calc(100% + 72px);

margin:
    34px
    -36px
    0
    -15px;

    padding: 34px 36px 38px;

    background: #ffffff;

    border-top: 1px solid #e2e8f0;

    box-sizing: border-box;
}

.legal-footer-brand img {
    display: block;

    width: 115px;
    max-height: 40px;

    margin-bottom: 12px;

    object-fit: contain;
    object-position: left center;
}

.legal-footer-brand p {
    max-width: 220px;

    margin: 0 0 10px;

    color: #64748b;

    font-size: 13px;
    line-height: 1.55;
}

.legal-footer-column h3 {
    margin: 0 0 14px;

    color: #4f46e5;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
}

.legal-footer-column a {
    display: block;

    width: fit-content;

    margin-bottom: 10px;

    color: #64748b;

    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.legal-footer-column a:hover {
    color: #4f46e5;
    transform: translateX(2px);
}


/* ==========================================
   Tablet
========================================== */

@media (max-width: 1100px) {

    .main.legal-page {
    width: calc(100% - 260px);
    margin-left: 260px;
    padding: 30px 26px 0;
}

    .legal-footer {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        width: calc(100% + 52px);

        margin:
            30px
            -26px
            0;

        padding:
            32px
            26px;

        gap: 30px;
    }
}


/* ==========================================
   Mobile
========================================== */

@media (max-width: 760px) {

    .main.legal-page {
    width: 100%;
    margin-left: 0;

    padding: 24px 16px 0;
}

    .legal-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;

        margin-bottom: 20px;
    }

    .legal-header h1 {
        font-size: 36px;
    }

    .legal-updated {
        padding-bottom: 0;
    }

    .legal-card {
        padding:
            6px
            14px;

        border-radius: 18px;
    }

    .legal-accordion-button {
        grid-template-columns:
            42px
            minmax(0, 1fr)
            20px;

        gap: 12px;

        min-height: 66px;
    }

    .legal-number {
        width: 42px;
        height: 42px;

        border-radius: 13px;

        font-size: 15px;
    }

    .legal-summary-text strong {
        font-size: 15px;
    }

    .legal-summary-text small {
        display: none;
    }

    .legal-content-inner {
        padding:
            0
            8px
            0
            54px;

        font-size: 13px;
    }

    .legal-accordion.is-open .legal-content-inner {
        padding-bottom: 20px;
    }

    .legal-footer {
        grid-template-columns: 1fr;

        width: calc(100% + 32px);

        margin:
            26px
            -16px
            0;

        padding:
            28px
            16px;

        gap: 26px;
    }
}

/* ==========================================
   Final accordion reset
========================================== */

.legal-page .legal-card {
    width: 100% !important;
    max-width: none !important;
    padding: 8px 24px !important;
}

.legal-page .legal-accordion {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.legal-page button.legal-accordion-button {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) 24px !important;
    align-items: center !important;
    gap: 18px !important;

    width: 100% !important;
    max-width: none !important;
    min-height: 72px !important;

    margin: 0 !important;
    padding: 10px 0 !important;

    background: transparent !important;
    background-image: none !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    color: inherit !important;

    font-family: inherit !important;
    text-align: left !important;

    cursor: pointer !important;

    appearance: none !important;
    -webkit-appearance: none !important;
}

.legal-page button.legal-accordion-button:hover {
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.legal-page .legal-number {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 46px !important;
    height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;
}

.legal-page .legal-summary-text {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
}

.legal-page .legal-summary-text strong {
    display: block !important;
    margin: 0 0 4px !important;

    font-size: 16px !important;
}

.legal-page .legal-summary-text small {
    display: block !important;
    margin: 0 !important;

    font-size: 13px !important;
}

.legal-page .legal-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 24px !important;
    height: 24px !important;

    margin: 0 !important;
    padding: 0 !important;
}

/* Keep content closed initially */

.legal-page .legal-content {
    display: block !important;

    max-height: 0;
    overflow: hidden;

    opacity: 0;

    transition:
        max-height 0.3s ease,
        opacity 0.2s ease;
}

.legal-page .legal-accordion.is-open .legal-content {
    opacity: 1;
}

.legal-page .legal-content-inner {
    padding: 0 42px 22px 64px !important;
}

