/* =========================================================
   GLOBAL MOBILITY EXPERTS - FREE PROFILE ASSESSMENT FORM
   Theme Colors:
   - Primary Navy: #105A7D
   - Accent Emerald: #2EB474
   - Font: 'Montserrat', sans-serif
========================================================= */

/* =========================================================
   OFFCANVAS SIDE DRAWER
========================================================= */

.profile-assessment-offcanvas {
    width: 600px !important;
    max-width: 100vw !important;
    border-left: none !important;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15) !important;
    background: #ffffff !important;
    font-family: 'Montserrat', sans-serif;
}

.profile-assessment-offcanvas .offcanvas-header {
    background: #ffffff;
}

.offcanvas-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #105A7D 0%, #0A3C54 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 90, 125, 0.3);
}

.btn-close-offcanvas {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #475569;
    border: 1.5px solid #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.btn-close-offcanvas:hover {
    background: #E11D48;
    color: #ffffff;
    border-color: #E11D48;
    transform: rotate(90deg);
}

/* =========================================================
   FORM CONTAINER (inside offcanvas)
========================================================= */

.profile-assessment-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

.profile-assessment-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 0;
}

.profile-assessment-card *,
.profile-assessment-card *::before,
.profile-assessment-card *::after {
    box-sizing: border-box;
}

/* =========================================================
   HEADER SECTION
========================================================= */

.assessment-header {
    text-align: center;
    margin: 0 0 20px 0;
}

.assessment-eyebrow {
    display: inline-block;
    padding: 5px 14px;
    background: #EAF7F1;
    color: #2EB474;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 10px;
}

.assessment-header h1 {
    color: #105A7D;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.assessment-header p {
    color: #5A6E79;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 14px 0;
}

.assessment-urgency {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    color: #92400E;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
}

/* =========================================================
   PROGRESS TRACKER
========================================================= */

.assessment-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 24px 0;
    position: relative;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.45;
    transition: all 0.3s ease;
    z-index: 2;
    background: #ffffff;
    padding: 0 4px;
}

.progress-step span {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    color: #64748B;
    border: 2px solid #CBD5E1;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.progress-step strong {
    font-size: 12.5px;
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.active span {
    background: #2EB474;
    color: #ffffff;
    border-color: #2EB474;
    box-shadow: 0 0 0 4px rgba(46, 180, 116, 0.2);
}

.progress-step.active strong {
    color: #105A7D;
    font-weight: 700;
}

.progress-step.completed span {
    background: #105A7D;
    color: #ffffff;
    border-color: #105A7D;
}

.progress-step.completed {
    opacity: 1;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #E2E8F0 0%, #E2E8F0 100%);
    margin: 0 -3px;
    z-index: 1;
    border-radius: 2px;
    transition: background 0.3s ease;
}

/* =========================================================
   STEPS CONTENT
========================================================= */

.assessment-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.assessment-step.active {
    display: block;
}

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

.step-heading {
    margin-bottom: 18px;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 10px;
}

.step-heading > span {
    color: #2EB474;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.step-heading h2 {
    color: #105A7D;
    font-size: 19px;
    font-weight: 700;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-heading p {
    color: #64748B;
    font-size: 12.5px;
    margin: 0;
}

/* =========================================================
   FORM GRID & GROUPS
========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group > label {
    margin-bottom: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1E293B;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group > label > span.req {
    color: #E11D48;
}

.label-icon {
    color: #105A7D;
    font-size: 12px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #CBD5E1;
    border-radius: 9px;
    outline: none;
    background: #FAFCFD;
    color: #0F172A;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    transition: all 0.22s ease;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 85px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2EB474;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(46, 180, 116, 0.12);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 34px;
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper .field-icon {
    position: absolute;
    left: 12px;
    color: #94A3B8;
    font-size: 12.5px;
    pointer-events: none;
}

.input-icon-wrapper input {
    padding-left: 34px !important;
}

/* Validation errors */
input.field-error,
select.field-error,
textarea.field-error {
    border-color: #E11D48 !important;
    background-color: #FFF1F2 !important;
}

label.field-error {
    border-color: #E11D48 !important;
    background-color: #FFF1F2 !important;
}

/* =========================================================
   CHECKBOX & RADIO CARDS
========================================================= */

.checkbox-grid,
.radio-grid,
.radio-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.checkbox-option,
.radio-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 9px 11px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    background: #FAFCFD;
    cursor: pointer;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    transition: all 0.18s ease;
    user-select: none;
    line-height: 1.35;
}

.checkbox-option:hover,
.radio-option:hover {
    border-color: #2EB474;
    background: #F0FAF5;
    transform: translateX(2px);
}

.checkbox-option input[type="checkbox"],
.radio-option input[type="radio"] {
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    accent-color: #2EB474;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-option:has(input:checked),
.radio-option:has(input:checked) {
    border-color: #2EB474;
    background: #EAF7F1;
    box-shadow: 0 2px 8px rgba(46, 180, 116, 0.1);
}

.checkbox-option input:checked + span,
.radio-option input:checked + span {
    color: #105A7D;
    font-weight: 600;
}

/* =========================================================
   SELECTED COUNTRY BADGE
========================================================= */

.selected-country-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #EAF7F1 0%, #F0FAF5 100%);
    border: 1.5px solid #2EB474;
    border-radius: 10px;
}

.selected-country-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EB474 0%, #1A8F56 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(46, 180, 116, 0.3);
}

.selected-country-text span {
    display: block;
    font-size: 10.5px;
    color: #5A6E79;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-country-text strong {
    font-size: 15px;
    color: #105A7D;
    font-weight: 800;
}

/* =========================================================
   TRUST / CONFIDENTIALITY NOTE
========================================================= */

.assessment-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.assessment-note-icon {
    font-size: 18px;
    color: #105A7D;
    margin-top: 1px;
    flex-shrink: 0;
}

.assessment-note-content strong {
    display: block;
    font-size: 12.5px;
    color: #105A7D;
    margin-bottom: 2px;
}

.assessment-note-content p {
    margin: 0;
    color: #64748B;
    font-size: 11.5px;
    line-height: 1.45;
}

/* =========================================================
   CONSENT CHECKBOX
========================================================= */

.consent-option {
    display: flex !important;
    align-items: flex-start !important;
    gap: 9px;
    padding: 10px 13px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 12px !important;
    color: #475569 !important;
    line-height: 1.45;
    margin: 0 !important;
    cursor: pointer;
}

.consent-option input {
    accent-color: #2EB474;
    width: 15px !important;
    height: 15px !important;
    margin-top: 2px !important;
    flex-shrink: 0;
}

/* =========================================================
   STEP NAVIGATION BUTTONS
========================================================= */

.step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1.5px solid #F1F5F9;
}

.assessment-next,
.assessment-submit,
.assessment-back {
    min-height: 43px;
    padding: 10px 22px;
    border: 0;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.assessment-next,
.assessment-submit {
    background: linear-gradient(135deg, #2EB474 0%, #22935D 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(46, 180, 116, 0.3);
    margin-left: auto;
}

.assessment-next:hover,
.assessment-submit:hover {
    background: linear-gradient(135deg, #259C62 0%, #1B784B 100%);
    box-shadow: 0 6px 20px rgba(46, 180, 116, 0.4);
    transform: translateY(-1px);
}

.assessment-back {
    background: #F1F5F9;
    color: #64748B;
    border: 1.5px solid #CBD5E1;
}

.assessment-back:hover {
    background: #E2E8F0;
    color: #1E293B;
    border-color: #94A3B8;
}

/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 620px) {
    .profile-assessment-offcanvas {
        width: 100vw !important;
    }

    .form-grid,
    .checkbox-grid,
    .radio-grid,
    .radio-list {
        grid-template-columns: 1fr;
    }

    .step-actions {
        flex-direction: column-reverse;
    }

    .assessment-next,
    .assessment-submit,
    .assessment-back {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }

    .progress-step strong {
        display: none;
    }
}

/* =========================================================
   SUCCESS MODAL (JS-created)
========================================================= */

#assessmentSuccessModal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.assessment-success-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 30, 50, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.assessment-success-dialog {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#assessmentSuccessModal.assessment-success-visible .assessment-success-backdrop {
    opacity: 1;
}

#assessmentSuccessModal.assessment-success-visible .assessment-success-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.assessment-success-inner {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 32px 32px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(16, 90, 125, 0.2);
    position: relative;
    overflow: hidden;
}

/* Top gradient bar */
.assessment-success-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2EB474 0%, #105A7D 100%);
}

/* Confetti ring */
.confetti-ring {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 140px;
    height: 140px;
    pointer-events: none;
}

.confetti-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.confetti-dot.c1 { background: #2EB474; top: 30px;  right: 30px;  animation: confettiBounce 2.5s 0.1s ease infinite; }
.confetti-dot.c2 { background: #105A7D; top: 10px;  right: 60px;  animation: confettiBounce 2s   0.3s ease infinite; width: 7px; height: 7px; }
.confetti-dot.c3 { background: #FCD34D; top: 50px;  right: 15px;  animation: confettiBounce 2.8s 0.5s ease infinite; width: 8px; height: 8px; }
.confetti-dot.c4 { background: #F87171; top: 70px;  right: 45px;  animation: confettiBounce 2.2s 0.2s ease infinite; width: 6px; height: 6px; }
.confetti-dot.c5 { background: #A78BFA; top: 20px;  right: 90px;  animation: confettiBounce 3s   0.4s ease infinite; width: 9px; height: 9px; }
.confetti-dot.c6 { background: #2EB474; top: 90px;  right: 80px;  animation: confettiBounce 2.4s 0.6s ease infinite; }

@keyframes confettiBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    50%       { transform: translateY(-10px) rotate(180deg); opacity: 1; }
}

/* Check icon */
.success-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2EB474 0%, #1B8A58 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 18px;
    box-shadow: 0 8px 20px rgba(46, 180, 116, 0.35);
    animation: successPop 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes successPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.success-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #2EB474;
    margin: 0 0 6px;
    font-family: 'Montserrat', sans-serif;
}

.success-title {
    font-size: 24px;
    font-weight: 800;
    color: #105A7D;
    margin: 0 0 12px;
    font-family: 'Montserrat', sans-serif;
}

.success-body {
    font-size: 13.5px;
    color: #5A6E79;
    line-height: 1.6;
    margin: 0 0 24px;
    font-family: 'Montserrat', sans-serif;
}

/* Next steps row */
.success-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.success-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.success-step span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EAF7F1;
    color: #2EB474;
    border: 2px solid #2EB474;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.success-step p {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: #105A7D;
    font-family: 'Montserrat', sans-serif;
}

.success-step-arrow {
    color: #CBD5E1;
    font-size: 14px;
    margin-top: -18px;
}

/* Close button */
.success-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 28px;
    border-radius: 50px;
    background: linear-gradient(135deg, #105A7D 0%, #0A3C54 100%);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(16, 90, 125, 0.25);
    transition: all 0.25s ease;
}

.success-close-btn:hover {
    background: linear-gradient(135deg, #2EB474 0%, #1B8A58 100%);
    box-shadow: 0 8px 22px rgba(46, 180, 116, 0.3);
    transform: translateY(-1px);
}