/**
 * customer-registration.css
 * Dedicated stylesheet for Customer Registration (customer_registration.html)
 */

body {
    font-family: Inter, Arial, sans-serif;
    background: #f5faff;
    color: #10243b;
}

.containerbody {
    width: min(820px, calc(100% - 40px));
    margin: auto;
}
#guardianSection{
    display: contents;
}

/* header */
.page-header {
    max-width: 1100px;
    margin: 40px auto 25px;
    text-align: center;
    background: #ffffff;
    border-radius: 20px;
    padding: 20px 10px;
    box-shadow: 0 12px 35px rgba(15, 65, 105, .08);
}

.page-header h1 {
    color: #004080;
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 700;
}

/* PAGE */
.registration-section {
    padding: 30px 0 60px;
}

.form-card {
    background: #fff;
    border-radius: 28px;
    padding: 40px;
    border: 1px solid #edf2f7;
    box-shadow: 0 15px 40px rgba(0, 64, 128, .08);
}

.main-title {
    text-align: center;
    color: #004080;
    margin-bottom: 35px;
    font-size: 34px;
}

/* SECTION */
.section-title {
    color: #004080;
    font-size: 22px;
    margin-bottom: 20px;
}

.section-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 64, 128, .08);
}

.section-header {
    background: #f8fbff;
    color: #004080;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid #edf2f7;
}

.section-body {
    padding: 28px;
}

/* GRID */
.form-hero {
    text-align: center;
    margin-bottom: 25px;
}

.hero-badge {
    padding: 8px 20px;
    font-size: 12px;
    border-radius: 999px;
    background: #edf4fb;
    color: #004080;
    font-weight: 700;
    margin-bottom: 12px;
}

.form-hero h1 {
    font-size: 34px;
    color: #0b2e59;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-hero p {
    color: #60758a;
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* gap: 16px 20px;*/
    column-gap: 20px;
    row-gap: 16px;
    align-items: start;

} 

.field {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: #1d3b5d;
    margin-bottom: 8px;
}

.field input::placeholder,
.field select {
    color: #8a9ab0;
}

.field input,
.field select {
    height: 40px;
    border: 1px solid #d9e5f1;
    border-radius: 12px;
    background: #ffffff;
    padding: 0 18px;
    font-size: 14px;
}

.field input:focus,
.field select:focus {
    border-color: #004080;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 64, 128, .08);
}

.field:focus-within {
    position: relative;
    z-index: 10;
}

.field {
    position: relative;
}

select {
    position: relative;
    z-index: 2;
}

/* ACCORDION */
.accordion {
    margin-bottom: 18px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 64, 128, .05);
    overflow: hidden;
    background: #fff;
}

.accordion-header {
    width: 100%;
    border-bottom: 1px solid #edf2f7;
    padding: 18px 24px;
    background: #004080;
    color: #fff; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.icon {
    font-size: 24px;
}

.accordion-content {
    display: none;
    padding: 22px;
    background: #fff;
}

.accordion.active .accordion-content {
    display: block;
}

.accordion-content {
    overflow: visible;
}

.accordion-content .field {
    position: relative;
    z-index: 1;
}

.accordion-content .field:focus-within {
    z-index: 10;
}


.static-content {
    display: block !important;
}

/* ===== NOMINEE CHECKBOX ===== */
.nominee-toggle {
    margin: 20px 0;
    padding: 15px 18px;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
}

.nominee-toggle label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
}

.nominee-toggle input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #2563eb;
}

/* ===== NOMINEE SECTION ===== */
#nomineeSection {
    margin-top: 15px;
}

.nominee-accordion {
    margin-bottom: 15px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    /* overflow: hidden; */
    overflow: visible;
    background: #ffffff;
}

.nominee-accordion .accordion-header,
.fatca-accordion .accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border: none;
    background: #004080 !important;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.nominee-accordion .icon,
.fatca-accordion .icon {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.nominee-accordion .accordion-header .icon {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.nominee-minor-field {
    display: none;
}

/* Nominee accordion content */
.nominee-accordion .accordion-content {
    display: none;
    padding: 20px;
    overflow: visible;
}

.nominee-accordion.active .accordion-content {
    display: block;
}

/* ===== ADD NOMINEE BUTTON ===== */
.add-nominee-wrap {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.add-nominee-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background: #004080;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.add-nominee-btn:hover {
    background: #00a651;
}

.add-nominee-btn:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 3px;
}

#nomineeWrapper {
    display: none;
}

/* Responsive layout */
@media (max-width: 600px) {
    .nominee-accordion .accordion-header {
        padding: 14px;
    }
    .nominee-accordion .accordion-content {
        padding: 14px;
    }
    .add-nominee-wrap {
        justify-content: stretch;
    }
    .add-nominee-btn {
        width: 100%;
    }
}

#country,
#state {
    background: #f8fafc;
    color: #334155;
    cursor: not-allowed;
    transition: background .3s ease, border-color .3s ease;
}

/* BUTTON */
.submit-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding: 20px 0;
}

.submit-btn {
    background: #004080;
    color: #fff;
    border: none;
    padding: 16px 42px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    min-width: 220px;
}

.submit-btn:hover {
    background: #00a651;
    transition: .3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.foreign-field {
    display: none;
}

/* .foreign-field.show {
    display: flex;
    flex-direction: column;
} */
 .foreign-field.show {
    display:block;
}

/* .error {
    display: block;
    font-size: 12px;
    color: #dc2626;
    margin-top: 2px;
    min-height: 0px;
} */

.input-error {
    border: 1px solid #dc2626 !important;
}

/* MOBILE */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-card {
        padding: 20px;
    }
    .main-title {
        font-size: 28px;
    }
}

/* ==========================================================
   MODALS (OTP & SUCCESS)
========================================================== */

.success-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    z-index: 99999;
}

.success-modal.show {
    display: flex;
}

.success-card {
    width: 90%;
    max-width: 520px;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: auto auto 20px;
    border-radius: 50%;
    background: #e8faf0;
    color: #00a651;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
}

.success-card h2 {
    color: #004080;
    margin-bottom: 10px;
}

.success-card p {
    color: #66778c;
}

.success-progress {
    width: 100%;
    height: 5px;
    background: #dceaf5;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 30px;
}

.success-progress-fill {
    width: 0%;
    height: 100%;
    background: #0d6efd;
}

.otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 40px;
}

.otp-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.otp-box {
    width: 52px;
    height: 58px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

.otp-box:focus {
    border-color: #004080;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 64, 128, .15);
}

.cancel-btn,
.send-btn,
.resend-btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.cancel-btn {
    background: #f1f5f9;
    color: #475569;
}

.cancel-btn:hover {
    background: #e2e8f0;
}

.send-btn {
    background: #004080;
    color: #ffffff;
}

.send-btn:hover {
    background: #00a651;
}

.resend-btn {
    background: #e0f2fe;
    color: #0369a1;
}

.resend-btn:hover:not(:disabled) {
    background: #bae6fd;
}

.resend-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.8;
}


.required{
    color: #dc2626;
    font-weight: 700;
}


.same-address-wrap{

    grid-column: 1 / -1;

    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px;
    background: #f5f8fc; 

    border: 1px solid #d9e7f7;

    border-radius: 7px;

    margin-bottom: 0px;
}


.same-address-checkbox,
.same-address-checkbox:focus,
.same-address-checkbox:focus-visible{
    outline: none !important;
    box-shadow: none !important;
}




.choices__inner{
    border-radius:12px !important;
}
/* 
.choices__inner.input-error{
    border-color:#dc2626 !important;
} */

.choices__inner.input-error{
    border:1px solid #dc2626 !important;
}

.input-error{
    border-color:#dc2626 !important;
}




/* Fix Choices.js dropdown sizing */
.choices {
    width: 100%;
    position: relative;
}
/* .choices__inner {
    min-height: 2px;
    height: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
} */
 .choices__inner {
    min-height: 40px !important;
    height: 40px !important;
    border: 1px solid #d9e5f1 !important;
    border-radius: 12px !important;
    background: #fff !important;

    display: flex;
    align-items: center;

    padding: 0 16px !important;
}


.choices__list--single{
    padding:0 !important;
}

.choices[data-type*="select-one"] .choices__inner{
    display:flex;
    align-items:center;
}

.choices__input{
    padding:4px 0 !important;
    margin:0 !important;
    font-size:14px !important;
    background:transparent !important;
}







/* Nominee Minor, DOB, Guardian Name, Guardian Relationship */

.nominee-accordion input,
.nominee-accordion select,
.nominee-accordion .choices__inner {
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Date field */
.nominee-accordion input[type="date"]{
    padding: 0 15px;
}

/* Choices.js dropdown */
.nominee-accordion .choices__inner{
    display: flex;
    align-items: center;
    padding: 0 12px;
}

/* Validation */
.nominee-accordion .input-error,
.nominee-accordion .choices__inner.input-error{
    border: 1px solid #dc2626 !important;
}

/* Error messages */
/* .nominee-accordion .error{
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #dc2626;
} */




.nominee-minor-field{
    display:none;
}

.nominee-minor-field{
    overflow: visible !important;
}

.nominee-minor-field .choices{
    overflow: visible !important;
}

/* .nominee-minor-field .choices__list--dropdown{
    overflow: visible !important;
} */

.nominee-minor-field input,
.nominee-minor-field select,
.nominee-minor-field .choices,
.nominee-minor-field .choices__inner{
    width:100%;
    height:44px !important;
    min-height:44px !important;
}



/* Same size for Nominee & FATCA sections */

#nomineeSection .accordion-header,
.fatca-accordion .accordion-header {
    height: 52px;
    min-height: 52px;

    padding: 0 20px !important;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Same outer box size */
#nomineeSection .accordion,
.fatca-accordion {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 20px;
}

/* Same icon styling for Nominee & FATCA */

#nomineeMainIcon,
.fatca-accordion .icon {
    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    font-weight: 500;
    color: #fff;

    line-height: 1;
}



#nomineeMainHeader,
.fatca-accordion .accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 52px;
    padding: 0 20px !important;
}
#nomineeSection .accordion,
.fatca-accordion {
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
}


.field .choices + .error{
    margin-top: 0px;
}



.field{
    display:flex;
    flex-direction:column;
    gap:2px;
}


.error {
    display: block;
    margin-top: 2px !important;
    font-size: 12px;
    color: #dc2626;
    line-height: 1.2;
}


.accordion{
    overflow:visible;
    border-radius:16px;
}

.nominee-accordion{
    overflow:visible;
    border-radius:16px;
}

.nominee-accordion .accordion-content{
    overflow:visible;
}

.choices{
    position:relative;
}

.choices__list--dropdown,
.choices__list[aria-expanded]{
    z-index:999999 !important;
}
.accordion-header{
    border-radius:16px;
}


.allocationInfo{
    display:block;
    margin-top:6px;
    font-size:12px;
    color:#2563eb;
    line-height:1.4;
}

.allocationError{
    display:block;
    margin-top:4px;
    color:#dc2626;
    font-size:12px;
}
/* 
.nominee-error {
    display: block;
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
} */

.nominee-accordion .error,
.nominee-error {
    display:block;
    margin-top:2px;
    font-size:12px;
    color:#dc2626;
    line-height:1.2;
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    color: #000 !important;
    background-color: #fff !important;
}

/* .choices__list--dropdown,
.choices__list[aria-expanded] {
    background: #fff !important;
} */

.choices__list--dropdown,
.choices__list[aria-expanded] {

    max-height: 220px !important;
    overflow-y: auto !important;

    background: #fff !important;
    border: 1px solid #d9e5f1 !important;

    z-index: 999999 !important;
}


.choices__item--selectable {
    color: #000 !important;
}

/* FIX CHOICES DROPDOWN OPTIONS VISIBILITY */

.choices__list--dropdown,
.choices__list[aria-expanded] {

    max-height: 220px !important;
    overflow-y: auto !important;

    background: #ffffff !important;

    border: 1px solid #d9e5f1 !important;

    z-index: 999999 !important;
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {

    display: block !important;

    color: #10243b !important;

    background: #ffffff !important;

    min-height: 40px !important;

    line-height: 40px !important;

    padding: 0 12px !important;
}

.choices__item--choice {

    color: #10243b !important;
     padding: 10px 12px !important;
}
.choices__list--dropdown .choices__input {
    display: block !important;
    width: 100% !important;
    min-height: 36px !important;
    padding: 8px 12px !important;
    border: 1px solid #d9e5f1 !important;
}

.choices__item--choice:hover {
    background: #edf4fb !important;
}

.choices__list--dropdown::-webkit-scrollbar {
    width: 8px;
}

.choices__list--dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}



/* fix */

/* Quick fix: prevent Guardian Relationship dropdown from being clipped */
.section-card:has(.choices.is-open),
#nomineeSection,
#nomineeSection .accordion,
.nominee-accordion,
.nominee-accordion .accordion-content {
    overflow: visible !important;
}

/* Keep the dropdown above other form elements */
.nominee-accordion .choices {
    position: relative;
    z-index: 99999 !important;
}

.nominee-accordion .choices__list--dropdown,
.nominee-accordion .choices__list[aria-expanded] {
    z-index: 100000 !important;
    max-height: 220px !important;
    overflow-y: auto !important;
}



/* Keep error messages close to their dropdowns */

/* .field .error {
    display: block;
    margin: 4px 0 0 !important;
    font-size: 12px;
    line-height: 14px;
} */

/* Remove extra spacing around Choices.js validation messages */
/* .field .choices + .error {
    margin-top: 4px !important;
} */




.field .choices {
    margin-bottom: 0 !important;
}

.choices {
    margin-bottom: 0 !important;
}

#bankAccountType:disabled {

    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;

}

#city {
    background-color: #ffffff !important;
}

#country {
    background-color: #f5f8fb !important;
}




/* =========================
   FLOATING TALK TO ADVISOR
========================= */

.floating-advisor{
    position:fixed;

    right:30px;
    bottom:30px;

    width:78px;
    height:78px;

    display:flex;
    justify-content:center;
    align-items:center;

    background:#ffffff;

    border:2px solid #004080;

    border-radius:50%;

    z-index:9999;

    box-shadow:
        0 10px 25px rgba(0,64,128,.20);

    transition:all .3s ease;
}

.floating-advisor img{
    width:58px;
    height:58px;
    object-fit:contain;
    display:block;
}

.floating-advisor:hover{
    transform:scale(1.08);

    box-shadow:
        0 15px 35px rgba(0,64,128,.30);
}

.floating-advisor::after{
    content:"";

    position:absolute;

    width:100%;
    height:100%;

    border-radius:50%;

    border:2px solid #004080;

    animation:advisor-pulse 2s infinite;

    pointer-events:none;
}

@keyframes advisor-pulse{

    0%{
        transform:scale(1);
        opacity:1;
    }

    100%{
        transform:scale(1.4);
        opacity:0;
    }

}

/* Mobile */

@media(max-width:560px){

    .floating-advisor{

        width:65px;
        height:65px;

        right:15px;
        bottom:15px;
    }

    .floating-advisor img{

        width:48px;
        height:48px;
    }

}