/* ==========================================================================
   RampsBD - payment gateway compliance styling
   Footer legal block, payment banner, legal pages and secure checkout.
   Loaded last so it can settle on top of the shared professional theme.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Footer : company legal identity block
   -------------------------------------------------------------------------- */
.footer-legal-identity {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-legal-identity dl {
    margin: 0;
}
.footer-legal-identity dt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    margin-bottom: 2px;
}
.footer-legal-identity dd {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px;
    color: rgba(255, 255, 255, .78);
}
.footer-legal-identity dd:last-child {
    margin-bottom: 0;
}
.footer-legal-identity .legal-value-strong {
    font-weight: 600;
    color: #fff;
    letter-spacing: .02em;
}

/* --------------------------------------------------------------------------
   2. Footer : payment methods banner (inside the dark widget area)
   -------------------------------------------------------------------------- */
.footer-payment-panel {
    /* The banner artwork is drawn for a light background, so it sits in a
       white card rather than directly on the dark footer. It lives in the
       9-column block beside the tall legal column, filling the space the
       shorter widgets leave behind. */
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px 14px;
    margin-top: 26px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}
.footer-payment-heading {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    color: #4a5459;
    margin: 0 0 12px;
}
.footer-payment-media {
    /* Below ~700px the logo strip becomes unreadable if squeezed, so it
       scrolls horizontally instead.
       width:0 + min-width:100% keeps the banner's min-width from widening the
       ancestor columns (which are shrink-to-fit at some breakpoints) while
       still filling the panel. */
    width: 0;
    min-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.footer-payment-banner {
    display: block;
    width: 100%;
    /* Never render narrower than this: below it the logo tiles stop being
       identifiable, so the strip scrolls inside .footer-payment-media instead. */
    min-width: 700px;
    max-width: 1180px;
    height: auto;
    margin: 0 auto;
}
.footer-payment-note {
    margin: 14px auto 0;
    max-width: 820px;
    font-size: 12.5px;
    line-height: 1.65;
    text-align: center;
    color: rgba(255, 255, 255, .62);
}
.footer-payment-note strong {
    color: rgba(255, 255, 255, .92);
}

/* --------------------------------------------------------------------------
   3. Footer : legal link bar
   -------------------------------------------------------------------------- */
.footer-legal-bar {
    background: #1b1e21;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, .07);
}
.footer-legal-links {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 0; /* collapses inline-block whitespace */
}
.footer-legal-links li {
    display: inline-block;
    font-size: 13.5px;
    line-height: 1.5;
    padding: 3px 0;
}
.footer-legal-links li + li::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 16px;
    vertical-align: -1px;
    background: rgba(255, 255, 255, .22);
}
.footer-legal-links a {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    transition: color .2s ease;
}
.footer-legal-links a:hover,
.footer-legal-links a:focus {
    color: var(--brand-red, #ed1c24);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. Legal pages (Terms, Privacy, Refund)
   -------------------------------------------------------------------------- */
.legal-page {
    background: var(--canvas, #f6f7f8);
}
.legal-shell {
    max-width: 1020px;
    margin: 0 auto;
}
.legal-doc {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(24, 29, 34, .045);
    padding: 46px 52px;
}
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    padding-bottom: 22px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--line, #e5e7e9);
}
.legal-meta span {
    font-size: 12.5px;
    color: var(--muted, #657078);
}
.legal-meta strong {
    color: var(--ink, #202326);
    font-weight: 600;
}
.legal-lead {
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink, #202326);
    margin-bottom: 30px;
}
.legal-doc h3 {
    font-size: 19px;
    margin: 36px 0 12px;
    padding-left: 14px;
    border-left: 3px solid var(--brand-red, #ed1c24);
    line-height: 1.35;
}
.legal-doc h3:first-of-type {
    margin-top: 0;
}
.legal-doc h4 {
    font-size: 15.5px;
    margin: 22px 0 8px;
}
.legal-doc p,
.legal-doc li {
    font-size: 14.5px;
    line-height: 1.78;
}
/* The global theme strips list markers; legal copy needs them back. */
.legal-doc ul,
.legal-doc ol {
    padding-left: 22px;
    margin-bottom: 16px;
}
/* style.css sets `li { list-style-type: none }` directly on the li, which
   beats inheritance from the list, so the type is restored on the li itself. */
.legal-doc ul > li { list-style-type: disc; }
.legal-doc ol > li { list-style-type: decimal; }
.legal-doc li {
    display: list-item;
    list-style-position: outside;
    margin-bottom: 7px;
    padding-left: 4px;
}
.legal-doc li::marker { color: var(--brand-red, #ed1c24); }
.legal-doc a {
    text-decoration: underline;
}

/* Callout used for the refund timeline and other must-read clauses. */
.legal-callout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fff5f5;
    border: 1px solid rgba(237, 28, 36, .22);
    border-left: 4px solid var(--brand-red, #ed1c24);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 24px 0;
}
.legal-callout .legal-callout-icon {
    flex: 0 0 auto;
    line-height: 0;
    padding-top: 2px;
    color: var(--brand-red, #ed1c24);
}
.legal-callout p {
    margin: 0;
    color: var(--ink, #202326);
}
.legal-callout p + p {
    margin-top: 8px;
}

/* Timeline table for the refund stages. */
.legal-table-wrap {
    overflow-x: auto;
    margin: 22px 0 26px;
}
.legal-table {
    width: 100%;
    min-width: 520px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}
.legal-table th,
.legal-table td {
    padding: 13px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line, #e5e7e9);
    vertical-align: top;
}
.legal-table thead th {
    background: #f2f4f5;
    color: var(--ink, #202326);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td {
    border-bottom: 0;
}
.legal-table tbody th {
    font-weight: 600;
    color: var(--ink, #202326);
    white-space: nowrap;
}

/* Contact card closing each legal page. */
.legal-contact-card {
    background: var(--canvas, #f6f7f8);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 12px;
    padding: 24px 28px;
    margin-top: 34px;
}
.legal-contact-card h4 {
    margin-top: 0;
}
.legal-contact-card p {
    margin-bottom: 4px;
}

/* Cross-links between the three policies. */
.legal-related {
    margin-top: 30px;
    text-align: center;
}
.legal-related span {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted, #657078);
    margin-right: 6px;
}
.legal-related a {
    display: inline-block;
    margin: 6px 5px 0;
    padding: 8px 16px;
    font-size: 13.5px;
    background: #fff;
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 999px;
    color: var(--ink, #202326);
    text-decoration: none;
    transition: all .2s ease;
}
.legal-related a:hover {
    border-color: var(--brand-red, #ed1c24);
    color: var(--brand-red, #ed1c24);
}

/* --------------------------------------------------------------------------
   5. Corporate identity panel (About page)
   -------------------------------------------------------------------------- */
.corporate-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1px;
    /* Surface, not line colour: an odd cell count must not leave a grey gap. */
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 14px;
    overflow: hidden;
}
.corporate-detail {
    background: var(--surface, #fff);
    box-shadow: 0 0 0 1px var(--line, #e5e7e9);
    padding: 22px 24px;
}
.corporate-detail dt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted, #657078);
    margin-bottom: 6px;
}
.corporate-detail dd {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink, #202326);
    font-weight: 600;
}

/* Management cards */
.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.management-card {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(24, 29, 34, .045);
    padding: 26px 28px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.management-card:hover {
    border-color: var(--brand-red, #ed1c24);
    box-shadow: 0 13px 30px rgba(237, 28, 36, .11);
}
.management-card .management-name {
    font-size: 17px;
    margin: 0 0 3px;
}
.management-card .management-role {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brand-red, #ed1c24);
    margin-bottom: 12px;
}
.management-card p {
    margin: 0;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   6. Secure checkout page
   -------------------------------------------------------------------------- */
.checkout-shell {
    max-width: 1080px;
    margin: 0 auto;
}
.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}
.checkout-panel {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(24, 29, 34, .045);
    padding: 34px 36px;
}
.checkout-panel > h3 {
    margin: 0 0 4px;
    font-size: 20px;
}
.checkout-panel > .checkout-panel-sub {
    margin: 0 0 26px;
    font-size: 14px;
}
.checkout-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 26px;
}
.checkout-fieldset legend {
    border: 0;
    margin: 0 0 16px;
    padding: 0 0 10px;
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted, #657078);
    border-bottom: 1px solid var(--line, #e5e7e9);
}
.checkout-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}
.checkout-field {
    margin-bottom: 18px;
}
.checkout-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink, #202326);
    margin-bottom: 6px;
}
.checkout-field label .optional {
    font-weight: 400;
    color: var(--muted, #657078);
}
.checkout-field .req {
    color: var(--brand-red, #ed1c24);
    margin-left: 2px;
}
.checkout-field input,
.checkout-field select,
.checkout-field textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 14.5px;
    color: var(--ink, #202326);
    background: #fff;
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 9px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.checkout-field input:focus,
.checkout-field select:focus,
.checkout-field textarea:focus {
    outline: none;
    border-color: var(--brand-red, #ed1c24);
    box-shadow: 0 0 0 3px rgba(237, 28, 36, .12);
}
.checkout-field textarea {
    resize: vertical;
    min-height: 92px;
}
.checkout-field .field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--brand-red, #ed1c24);
}
.checkout-field input.input-validation-error,
.checkout-field select.input-validation-error,
.checkout-field textarea.input-validation-error {
    border-color: var(--brand-red, #ed1c24);
    background: #fffafa;
}
.checkout-amount-prefix {
    position: relative;
}
.checkout-amount-prefix::before {
    content: "BDT";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #657078);
    pointer-events: none;
}
.checkout-amount-prefix input {
    padding-left: 52px;
}

/* The mandatory consent block, immediately above the Place Order button. */
.checkout-consent {
    background: var(--canvas, #f6f7f8);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 12px;
    padding: 20px 22px;
    margin: 6px 0 22px;
    transition: border-color .2s ease, background .2s ease;
}
.checkout-consent.has-error {
    border-color: var(--brand-red, #ed1c24);
    background: #fff5f5;
}
.checkout-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}
.checkout-consent-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin: 2px 0 0;
    accent-color: var(--brand-red, #ed1c24);
    cursor: pointer;
}
.checkout-consent-label span {
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink, #202326);
}
.checkout-consent-label a {
    font-weight: 600;
    text-decoration: underline;
}
.checkout-consent .field-validation-error {
    display: block;
    margin: 10px 0 0 32px;
    font-size: 12.5px;
    color: var(--brand-red, #ed1c24);
    font-weight: 600;
}

.checkout-submit {
    width: 100%;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    background: var(--brand-red, #ed1c24);
    border: 1px solid var(--brand-red, #ed1c24);
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease;
}
.checkout-submit:hover {
    background: var(--brand-red-dark, #c9161d);
    border-color: var(--brand-red-dark, #c9161d);
}
.checkout-submit:active {
    transform: translateY(1px);
}
.checkout-submit-note {
    margin: 12px 0 0;
    font-size: 12.5px;
    text-align: center;
    color: var(--muted, #657078);
}

/* Right-hand summary rail */
.checkout-aside {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 18px;
}
.checkout-card {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(24, 29, 34, .045);
    padding: 24px 26px;
}
.checkout-card h4 {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted, #657078);
}
.checkout-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.checkout-card li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 11px;
    font-size: 13.8px;
    line-height: 1.6;
}
.checkout-card li:last-child {
    margin-bottom: 0;
}
.checkout-card li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: #1f9d55;
    font-weight: 700;
}
.checkout-card.checkout-card--payments {
    text-align: center;
}
.checkout-card.checkout-card--payments .checkout-verified-badge {
    width: 168px;
    max-width: 100%;
    height: auto;
    margin: 4px auto 0;
}

/* Order confirmation */
.order-confirm {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7e9);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(24, 29, 34, .045);
    padding: 48px 44px;
}
.order-confirm-tick {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #e8f6ee;
    color: #1f9d55;
}
.order-confirm h3 {
    margin: 0 0 10px;
}
.order-confirm-ref {
    display: inline-block;
    margin: 18px 0 6px;
    padding: 11px 22px;
    background: var(--canvas, #f6f7f8);
    border: 1px dashed var(--line, #e5e7e9);
    border-radius: 9px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--ink, #202326);
}

/* --------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .checkout-aside {
        position: static;
    }
}
@media (max-width: 767px) {
    .legal-doc {
        padding: 30px 22px;
    }
    .checkout-panel {
        padding: 26px 22px;
    }
    .order-confirm {
        padding: 36px 24px;
    }
    /* Separators read badly once the links wrap, so switch to a gap layout. */
    .footer-legal-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 22px;
    }
    .footer-legal-links li + li::before {
        display: none;
    }
    .footer-payment-panel {
        padding: 16px 14px 12px;
        margin-top: 26px;
    }
    .footer-payment-note {
        font-size: 12px;
    }
}
