/* CLIENT SHARED COMPONENTS — standard shared stylesheet for the customer-facing
 * redesign vocabulary (typography, step progress, cards, CTA buttons, FAQ,
 * validation, opt-in form controls). Layer 3 of the theme family:
 *   client-theme.css (tokens) -> client-theme-overrides.css (vendor) -> client-components.css
 * Linked PER PAGE (not globally), before any page-specific stylesheet so page
 * overrides keep winning. Scope: customer-facing only; admin excluded.
 * Extracted from modules/profile/css/registration-style.css (ADEV-869). */

/* ============================== Typography ============================== */

.text-14-400 {
    font-family: var(--font-base) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 18.75px !important;
    text-align: left !important;
    color: black !important;
}

.text-14-400-gray {
    font-family: var(--font-base) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 18.75px !important;
    text-align: left !important;
    color: #8E8D8D !important;
}

.title-black-24 {
    max-width: 1300px !important;
    font-family: var(--font-base);
    font-size: 24px;
    font-weight: 700;
    line-height: 30.47px;
    text-align: left;
    margin: auto;
}

@media screen and (max-width: 1024px) {
    .title-black-24 {
        max-width: 1300px !important;
        font-family: var(--font-base);
        font-size: 18px;
        font-weight: 700;
        line-height: 30.47px;
        text-align: left;
        margin: auto;
        margin-bottom: 10px !important;
    }
    .md-mb-5, div.md-mb-5 {
        margin-bottom: 20px !important;
    }


    .title-black {
        font-size: 18px;
        line-height: 18px;
    }
}

.title-black {
    max-width: 1300px !important;
    font-family: var(--font-base);
    font-size: 24px;
    font-weight: 700;
    line-height: 24px;
    text-align: left;
    margin: auto;
}
.subtitle-black {
    font-family: var(--font-base) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 30.47px !important;
    text-align: left !important;
}

.text-black {
    color: #000 !important;
    font-family: var(--font-base);
    font-size: 16px;
    font-weight: 400;
    line-height: 18.75px;
    text-align: left;

}

.text-16-700 {
    font-family: var(--font-base) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 18.75px !important;
    text-align: left;

}

.text-14-700 {
    font-family: var(--font-base) !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 21.78px;
    text-align: left;
    color: black;
}

.text-14-gray {
    font-family: var(--font-base) !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 21.78px;
    text-align: left;
    color: #757676;
}
.text-14-darkgray {
    font-family: var(--font-base) !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 21.78px;
    text-align: left;
    color: #757676;
    margin: 0px !important;
}
.text-20-blue {
    font-family: var(--font-base) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 23.44px !important;
    text-align: left !important;
    color: var(--brand-primary) !important;

}

/* ============================== FAQ / need help ============================== */

.faq-question {
    font-family: var(--font-base) !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 21.09px;
    text-align: left;
    color: var(--brand-accent) !important;
}

.faq-answer {
    font-family: var(--font-base) !important;
    font-size: 18px;
    font-weight: 400;
    line-height: 21.09px;
    text-align: left;
    color: #000000 !important;
}

/* Unscoped equivalent of the pre-verification "Need help?" heading
   (#step-content .need-help-title in registration-style.css). */
.need-help-title {
    font-family: var(--font-base) !important;
    font-size: 20px !important;
    font-weight: 600;
    line-height: 28px;
    color: var(--brand-text-muted);
    margin: 0 0 16px;
}

/* ============================== Step progress ============================== */

.steps-container {
    display: flex;
    justify-content: start;
    align-items: flex-start;
    counter-reset: pv-step;

    max-width: 1780px;
    /*margin-left: calc(50vw - 660px);*/
}

@media screen and (max-width: 1024px) {
    .steps-container {
        margin-left: 0px !important;
    }
}

.step-label:first-child {
    margin-left: 0px !important;
}

.step-label {
    flex: 1 0 120px;
    text-align: center;
    padding-top: 46px;
    padding-bottom: 10px;
    position: relative;
    margin: 0;
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    color: var(--brand-text-muted);
    white-space: nowrap;
    text-transform: capitalize;
}

/* numbered circle marker (auto-numbered via counter).
   Default = upcoming: white circle, muted digit + text. */
.step-label::before {
    counter-increment: pv-step;
    content: counter(pv-step);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-white);
    color: var(--brand-text-muted);
    border: 1.5px solid var(--brand-border);
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
    line-height: 29px;
    text-align: center;
    z-index: 1;
}

/* achieved step: green circle with a white tick, success-coloured title */
.step-label.completed {
    color: var(--brand-success);
}
.step-label.completed::before {
    content: "✓";
    background: var(--brand-success);
    color: var(--brand-white);
    border-color: var(--brand-success);
    font-size: 15px;
}

/* horizontal connector between circles */
.step-label:not(:first-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--brand-border);
    z-index: 0;
}

/* connector turns green together with the completed/active steps */
.step-label.completed:not(:first-child)::after,
.step-label.active:not(:first-child)::after {
    background: var(--brand-success);
}

.step-label.active {
    color: var(--brand-text-darker);
    font-weight: 600;
    scroll-margin-left: calc(75px); /* Adjust the step alignment if needed */
}
.step-label.active::before {
    background: var(--brand-text-darker);
    color: var(--brand-white);
    border-color: var(--brand-text-darker);
}

@media screen and (max-width: 540px) {
    .steps-container-hr {
        width: 100% !important;
        margin-left: 0 !important;
    }
}
.steps-container-hr {
    width: 200vw;
    margin-left: -90%;
    margin-top: -2px !important;
    height: 0px !important;
    border: 1px solid var(--brand-border);
}

/* ============================== Cards ============================== */

/* Generic flat redesign card — same visual recipe as the KYC form card
   (#step-form / .container-flat in registration-style.css) without their
   layout-specific width/height/margin constraints. */
.card-flat {
    background: var(--brand-white);
    border-radius: 20px;
    box-shadow: 0px 0px 10px 0px #00000026;
}

/* ============================== CTA buttons ============================== */

/* Redesign CTA — visual recipe of the KYC Continue button
   (.desktop-register + #step-form coral override in registration-style.css),
   made inline-friendly for standalone/side-by-side use. */
.brand-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 32px;
    gap: 0px;
    border: 0;
    border-radius: 10px !important;
    background: var(--brand-accent) !important;

    font-family: var(--font-base) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 21.09px !important;
    text-align: center !important;

    color: var(--brand-button-primary-text) !important;
    text-decoration: none !important;
    cursor: pointer;
}
.brand-cta:hover {
    background: var(--bs-primary-hover) !important;
    color: var(--brand-button-primary-text) !important;
}
.brand-cta.button-cancel {
    background: var(--brand-white) !important;
    border: 2px solid var(--brand-primary) !important;
    color: var(--brand-primary) !important;
}
.brand-cta.button-cancel:hover {
    background: var(--brand-bg-soft) !important;
}
.brand-cta:disabled,
.brand-cta.disabled {
    background: var(--brand-border) !important;
    cursor: default;
    pointer-events: none;
}

/* ============================== Opt-in form controls (.rd-form) ============================== */

/* Redesigned form controls: wrap a form/container in .rd-form to opt in.
   Recipe matches the register/login/KYC fields (#register-page / #step-form
   overrides in registration-style.css): 56px, 4px radius, brand border. */
.rd-form input[type=text],
.rd-form input[type=email],
.rd-form input[type=password],
.rd-form input[type=date],
.rd-form input[type=number],
.rd-form select {
    padding: .67857143em 1em;
    box-shadow: none !important;
    background: var(--brand-white);
    color: rgba(0, 0, 0);

    width: 100%;
    max-width: 100%;
    height: 56px;
    border-radius: 4px !important;
    border: 1px solid var(--brand-border) !important;

    font-family: var(--font-base);
    font-size: 1rem;
    font-weight: 400;
    line-height: 18.75px;
    text-align: left;
}

/* Inside Bootstrap input-groups keep the flex sizing so prepend/append stay inline */
.rd-form .input-group input[type=text],
.rd-form .input-group input[type=email],
.rd-form .input-group input[type=number],
.rd-form .input-group input[type=date] {
    width: 1%;
    flex: 1 1 auto;
}

.rd-form input::placeholder {
    color: var(--brand-text-muted);
    opacity: 1;
}
.rd-form input:focus::placeholder {
    color: transparent;
}

.rd-form label {
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-text-dark);
}

/* Redesigned radio/checkbox skin (icon-based, as on KYC forms) */
.rd-form input[type="radio"],
.rd-form input[type="checkbox"] {
    display: none;
}
.rd-form input[type="radio"] + .form-check-label,
.rd-form input[type="checkbox"] + .form-check-label {
    display: inline-block;
    padding-left: 40px;
    background-image: url('/images/icons/no.svg?2q');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 24px 24px;
    cursor: pointer;
    margin-bottom: 16px;
    font-family: var(--font-base) !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 24px;
    text-align: left;
    height: 24px !important;
}
.rd-form input:checked + .form-check-label {
    background-image: url('/images/icons/yes-accent.svg');
    height: 24px;
}

/* ============================== Validation ============================== */

.validation-feedback { font-size: 0.875rem; margin-top: 0.25rem; }
.inline-field-error { color: #dc3545; font-size: 0.875rem; margin-top: 0.25rem; display: block; }

/* Clickable validation error summary */
.validation-error-summary {
    background: #fff3f3;
    border: 1px solid #dc3545;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.validation-error-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.validation-error-summary li {
    padding: 4px 0;
}
.validation-error-summary a {
    color: #dc3545;
    text-decoration: underline;
    cursor: pointer;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}
.validation-error-summary a:hover {
    color: #a71d2a;
}
