/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.fsl-model-p {
    text-decoration: underline;
}

body {
    line-height: 1.6;
    background: #f6f8fa;
    min-height: 100vh;
}

.section-padding-sm {
    padding: 3rem 0;
    padding-bottom: 16px;
}

[type=text]:not([readonly]):focus {
    background-color: transparent !important;
}

[type=text]:not([readonly]):focus {
    border: 2px solid #0083f5;
}

[type=date]:not([readonly]):focus {
    border: 2px solid #0083f5;
}

[type=tel]:not([readonly]):focus {
    border: 2px solid #0083f5;
}

[type=number]:not([readonly]):focus {
    border: 2px solid #0083f5;
}

[type=text][readonly]:focus {
    border: 2px solid #0083f5;
}

/* Fix for signature-date field */
.signature-date-field {
    flex: 0 0 auto;
    width: 180px;
}

.floating-input__field:focus+.new-floating-date,
.floating-input__field:not(:placeholder-shown)+.new-floating-date {
    top: -11px;
    left: 8px;
    font-size: 0.9rem;
    color: #4b5563;
    background: #f4f7fb;
    padding: 0 5px;
    font-weight: 500;
    width: auto;
}

.new-floating-date {
    width: auto;
    min-width: 60px;
    white-space: nowrap;
}

/* Mobile responsiveness for signature-date field */
@media (max-width: 768px) {
    .signature-date-field {
        width: 100%;
        min-width: 100%;
    }

    .fsl-signature-fields {
        flex-direction: column;
        gap: 0.75rem;
    }
}

.fsl-required-badge {
    display: inline-block;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
    padding: 0px 7px;
    margin-left: 5px;
    letter-spacing: 0.03em;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.fsl-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(30, 60, 114, 0.15);
    padding: 2.5rem 2rem;
    max-width: 680px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0 auto;
}

.fsl-logo {
    height: 40px;
    margin-bottom: 1.5rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.fsl-title {
    font-size: 30px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    width: 100%;
    padding: 0 10px;
}

.fsl-subtitle {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    text-align: center;
    word-wrap: break-word;
    width: 100%;
    padding: 0 10px;
}

.fsl-input {
    width: 100%;
    height: 54px;
    border: 1.5px solid #d1d5db;
    font-size: 1rem;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    background: #fff;
    color: #1e3c72;
    border-radius: 8px;
    padding: 0 15px;
    box-sizing: border-box;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
}

.fsl-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.fsl-input::placeholder {
    color: #9ca3af;
}

.fsl-btn {
    width: 100%;
    background: #2457C5;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    padding: 16px 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.2);
    transition: all 0.2s ease;
    margin-top: 0.25rem;
    font-family: 'Roboto', sans-serif;
}

.fsl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 60, 114, 0.25);
}

.fsl-btn:active {
    transform: translateY(0);
}

.fsl-success-box {
    display: flex;
    align-items: flex-start;
    background: #f3f6fa;
    border-radius: 12px;
    padding: 1.0rem 0.9rem;
    margin-top: 0.75rem;
    gap: 0.6rem;
    border: 1.5px solid #e5e7eb;
    animation: fadeIn 0.5s ease;
}

.fsl-success-icon {
    color: #22c55e;
    font-size: 1.6rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.fsl-success-title {
    font-weight: 700;
    color: #1e3c72;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.fsl-success-desc {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Checkbox styles */
.fsl-checkbox-container {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.fsl-checkbox {
    margin-right: 12px;
    margin-top: 3px;
    accent-color: #2563eb;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.fsl-checkbox-label {
    font-size: 0.87rem;
    color: #4b5563;
    line-height: 1.5;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    word-wrap: break-word;
}

.fsl-terms-link {
    color: #2563eb;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

/* Terms content styles */
.fsl-terms-content {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.9rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #4b5563;
    max-height: 200px;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.fsl-terms-content p {
    margin-bottom: 0.5rem;
}

.fsl-terms-content a {
    color: #2563eb;
    text-decoration: underline;
}

/* Warning message */
.fsl-warning {
    color: #ef4444;
    text-align: justify !important;
    font-size: 0.85rem;
    margin-top: -10px;
    text-align: center;
    display: none;
    font-family: 'Roboto', sans-serif;
    margin-left: 8px;
    margin-bottom: 8px;
}

/* Consent warning message */
.fsl-consent-warning {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    padding: 0.5rem;
    background-color: #fef2f2;
    border-radius: 4px;
    border: 1px solid #fecaca;
}

/* Field note styles */
.fsl-field-note {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
    font-style: italic;
    line-height: 1.2;
}

/* Consent Section Styles */
.fsl-consent-section {
    margin: 1.5rem 0;
    padding: 0;
}

.fsl-consent-text {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    line-height: 1.4;
}

/* Verification Section Styles */
.fsl-verification-section {
    margin: 1rem 0;
    padding: 0.85rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* .fsl-verification-fields {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
} */
.fsl-verification-fields {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: -18px;
    margin-top: 11px;
}

.fsl-verification-field {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.fsl-verification-input {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
}

.fsl-verification-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Floating label styles */
.floating-input {
    position: relative;
    margin-bottom: 6px;
    margin-top: 6px;
}

.floating-input__field {
    width: 100%;
    height: 47px;
    padding: 15px 12px 5px;
    font-size: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s;
}

.floating-input__field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.13);
    outline: none;
}

.floating-input__label {
    position: absolute;
    top: 9px;
    left: 12px;
    font-size: 1rem;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
    background: #f9f9f8;
    padding: 0 4px;
}

.floating-input__field:focus+.floating-input__label,
.floating-input__field:not(:placeholder-shown)+.floating-input__label {
    top: -11px;
    left: 8px;
    font-size: 0.9rem;
    color: #4b5563;
    background: #f4f7fb;
    padding: 0 5px;
    font-weight: 500;
}

.floating-input__field:focus+.new-floating-date,
.floating-input__field:not(:placeholder-shown)+.new-floating-date {
    top: -11px;
    left: 8px;
    font-size: 0.9rem;
    color: #4b5563;
    background: #f4f7fb;
    padding: 0 5px;
    font-weight: 500;
    width: auto;
}

.new-floating-date {
    width: 70%;
}

/* Enhanced Section Styles */
.enhanced-section {
    background: #f4f7fb;
    border: 1.5px solid #e0e7ef;
    border-radius: 10px;
    margin-top: 4px;
    /* margin-bottom: 36px; */
    margin-bottom: 10px;
    padding: 1.5rem 1rem 1.2rem 1rem;
    box-shadow: 0 2px 12px rgba(30, 60, 114, 0.06);
}

.enhanced-section-header {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.enhanced-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3c72;
    letter-spacing: 0.01em;
    margin-bottom: 0.1rem;
}

.enhanced-section-desc {
    font-size: 0.97rem;
    color: #6b7280;
    font-weight: 400;
}

/* Disclosures Section */
.fsl-disclosures-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 29px;
}

.fsl-disclosure-text {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
    font-family: 'Roboto', sans-serif;
    text-align: justify;
}

/* Modal Styles */
.fsl-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fsl-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

.fsl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.fsl-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e3c72;
}

.fsl-modal-close {
    color: #6b7280;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.fsl-modal-close:hover,
.fsl-modal-close:focus {
    color: #1e3c72;
    text-decoration: none;
}

.fsl-modal-body {
    padding: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4b5563;
}

.fsl-modal-body p {
    margin-bottom: 1rem;
}

.fsl-modal-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.fsl-modal-body li {
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-first responsive styles */
@media (max-width: 768px) {
    .section-padding-sm {
        padding: 1.5rem 0;
    }

    .fsl-card {
        padding: 1.5rem;
        border-radius: 10px;
        margin: 0 auto;
        max-width: 90%;
        margin-top: 0;
    }

    .fsl-title {
        font-size: 1.6rem;
        text-align: center;
        margin: 0 auto;
        display: block;
        width: 100%;
        margin-left: -12px;
    }

    .fsl-subtitle {
        font-size: 0.95rem;
        text-align: center;
        margin: 0 auto;
        display: block;
        width: 100%;
    }

    .fsl-input {
        height: 50px;
        font-size: 0.95rem;
    }

    .fsl-btn {
        padding: 14px 0;
        font-size: 0.95rem;
    }

    .fsl-checkbox-label {
        font-size: 0.82rem;
    }

    .fsl-terms-content {
        font-size: 0.75rem;
        padding: 0.75rem;
    }

    .fsl-success-box {
        padding: 1rem 0.75rem;
    }

    .fsl-verification-field {
        width: 100%;
        min-width: 100%;
    }

    .fsl-verification-section,
    .fsl-disclosures-section {
        padding: 0.75rem;
    }

    /* Improved logo responsiveness */
    .fsl-logo {
        height: auto;
        max-height: 40px;
        width: auto;
        max-width: 80%;
    }

    .text-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .enhanced-section {
        padding: 1rem 0.7rem 1rem 0.7rem;
    }

    .enhanced-section-title {
        font-size: 1.02rem;
    }

    .enhanced-section-desc {
        font-size: 0.89rem;
    }

    .floating-input__field {
        height: 45px;
    }

    .floating-input__label {
        top: 11px;
        font-size: 14px;
        height: 28px;
    }

    .floating-input__field:focus+.floating-input__label,
    .floating-input__field:not(:placeholder-shown)+.floating-input__label {
        top: -8px;
        font-size: 0.75rem;
    }

    .fsl-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .fsl-modal-header {
        padding: 0.75rem 1rem;
    }

    .fsl-modal-body {
        padding: 1rem;
    }
}

@media (max-width: 360px) {

    .floating-input__field:focus+.floating-input__label,
    .floating-input__field:not(:placeholder-shown)+.floating-input__label {
        top: -6px;
        font-size: 11px;
    }
}

/* Hide h2:before on mobile */
h2.fsl-title:before {
    display: none !important;
}

@media (max-width: 480px) {
    .fsl-card {
        padding: 1.25rem;
        max-width: 95%;
        border-radius: 8px;
    }

    .fsl-title {
        font-size: 1.4rem;
        padding: 0 5px;
        margin-left: 56px;
    }

    .fsl-subtitle {
        font-size: 0.9rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .fsl-checkbox-label {
        font-size: 0.8rem;
    }

    .fsl-logo {
        max-height: 35px;
        max-width: 75%;
    }

    .fsl-input {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}

@media (max-width: 375px) {
    .fsl-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .fsl-title {
        font-size: 1.3rem;
        margin-left: 53px !important;
    }

    .fsl-subtitle {
        font-size: 0.85rem;
    }

    .fsl-checkbox-label {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .fsl-terms-content {
        font-size: 0.72rem;
        padding: 0.6rem;
    }

    .fsl-btn {
        font-size: 0.9rem;
        padding: 12px 0;
    }

    .fsl-consent-warning {
        font-size: 0.8rem;
        padding: 0.4rem;
    }

    .fsl-logo {
        max-height: 32px;
    }

    .floating-input__label {
        top: 11px;
        font-size: 13px;
        height: 26px;
    }
}

@media (max-width: 320px) {
    .fsl-card {
        padding: 0.8rem;
    }

    .fsl-title {
        font-size: 1.2rem;
    }

    .fsl-checkbox-label {
        font-size: 0.75rem;
    }

    .fsl-input {
        height: 45px;
        font-size: 0.85rem;
    }

    .fsl-logo {
        max-height: 30px;
        max-width: 70%;
    }
}

/* Desktop-specific styles */
@media (min-width: 769px) {
    .fsl-card {
        margin-top: 2rem;
    }
}

@media (min-width: 1024px) {
    .fsl-card {
        margin-top: 3rem;
    }
}

.fsl-terms-hr {
    margin-top: 0px;
    background-color: black;
}

@media (max-width: 540px) {
    .fsl-title {
        margin-left: 48px !important;
    }
}

/* verification-field gap adjustment specially for mobiles */

@media screen and (max-width: 768px) {
    .floating-input {
        position: relative;
        margin-bottom: -8px;
        margin-top: 7px;
    }

    .fsl-verification-fields {
        display: flex;
        gap: 0px;
        flex-wrap: wrap;
        margin-bottom: -8px;
        margin-top: 7px;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .floating-input {
        position: relative;
        margin-bottom: -8px;
        margin-top: 7px;
    }

    .fsl-verification-fields {
        display: flex;
        gap: 0px;
        flex-wrap: wrap;
        margin-bottom: -8px;
        margin-top: 7px;
    }
}