* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #F8F1EC;
}

.form-rounded {
    background: #7159A1;
    flex-grow: 1;
    border-radius: 24px;
}

.form-rounded.rounded {
    border-radius: 40px;
    margin: 0 80px 48px;
}

.form-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 24px 16px;
    box-shadow: none;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .form-container {
        padding: 32px 16px;
    }

    .form-container.wizard {
        padding: 0;
        min-height: auto;
        height: 100%;
    }
}

.form-container .form-view {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

/* Allow success view to use full width */
#codeEntryView {
    max-width: none;
}

.form-container.wizard {
    box-shadow: none;
    color: white;
    max-width: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.form-header {
    text-align: left;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.logo {
    display: none;
    padding: 0 80px;
    height: 112px;
    align-items: center;
    padding: 0 80px;
    height: 112px;
}

.logo img {
  height: 32px;
  margin-bottom: 16px;
}

.logo.active-logo {
    display: flex !important;
}

@media (max-width: 480px) {
    .section-heading {
        white-space: normal !important;
    }
}

@media (max-width: 480px) {
  .form-header .section-heading {
    white-space: normal !important;
    word-break: break-word;
  }
}

.wizard .form-header {
    text-align: center;
}

#initialForm .form-header {
    margin-bottom: 16px;
}

#initialFormData {
    margin: 0;
    padding: 0;
}

#initialForm .form-group input[type="text"],
#initialForm .form-group input[type="email"] {
    height: 40px;
    box-sizing: border-box;
}

#continueBtn {
    height: 44px;
    box-sizing: border-box;
}

.wizard-header {
    display: none;
    text-align: center;
    color: white;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    min-height: 60px;
}

@media (min-width: 768px) {
    .wizard-header {
        min-height: 80px;
    }
}

.wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 24px;
    margin: 32px 0 32px 0;
    padding: 0 16px;
    position: relative;
}

/* Mobile: Add 16px gap from top of view to loan-info */
@media (max-width: 767px) {
    .wizard-header {
        padding-top: 16px;
    }

    .wizard-nav {
        padding-left: 8px;
    }
}


.wizard-header.active {
    display: flex;
}

.wizard-header .close-btn,
.wizard-header .back-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wizard-header .close-btn {
    font-size: 24px;
}

.wizard-header .back-btn {
    font-size: 20px;
}

.wizard-header .loan-info {
    font-family: 'Nimbus Sans Extd', 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.2;
    color: #F8F1EC;
    opacity: 0.8;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 16px;
}

@media (max-width: 480px) {
    .wizard-header .loan-info {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.3;
    }

    .form-container.wizard {
        justify-content: flex-start;
        padding-top: 20px;
    }
}

/* Tablet and Desktop: Move wizard form to top of container */
@media (min-width: 481px) {
    .form-container.wizard {
        justify-content: flex-start;
        padding-top: 0;
    }

    /* Wizard question styling */
    .wizard-question h2 {
        font-size: 36px !important;
        line-height: 38px !important;
        font-weight: 700 !important;
    }

    /* Text input fields for steps 1 & 5 */
    #wizardStep1 input[type="text"],
    #wizardStep5 input[type="tel"] {
        font-size: 40px !important;
        line-height: 42px !important;
        font-weight: 400 !important;
    }

    #wizardStep1 input::placeholder,
    #wizardStep5 input::placeholder {
        font-size: 40px;
        line-height: 42px;
        font-weight: 400;
    }

    /* Submit buttons for steps 1 & 5 - same layout as mobile, updated text */
    #submitBtn1,
    #submitBtn5 {
        /* Layout (same as mobile) */
        display: flex;
        height: 44px;
        padding: 10px 16px 10px 12px;
        justify-content: center;
        align-items: center;
        gap: 4px;
        align-self: stretch;

        /* Style (same as mobile) */
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.80);
        background: rgba(255, 255, 255, 0.20);
        box-shadow: 0 0 0 1px rgba(10, 13, 18, 0.18) inset,
            0 -2px 0 0 rgba(10, 13, 18, 0.05) inset,
            0 1px 2px 0 rgba(10, 13, 18, 0.05);

        /* Text styling */
        font-size: 16px;
        line-height: 24px;
        font-weight: 600;
    }

    /* Hint text styling */
    .hint-text {
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
    }

    /* Gap between wizard-question and form-group for steps 1 & 5 */
    #wizardStep1 .wizard-question,
    #wizardStep5 .wizard-question {
        margin-bottom: 40px;
    }

    /* Fixed height container to prevent button height changes during loading */
    #submitBtn1 .btn-icon,
    #submitBtn5 .btn-icon {
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: -1px;
        /* Fine-tune alignment with text */
    }

    .wizard-question {
        margin-top: 32px;
        text-align: center;
    }
}

.wizard-header .loan-amount {
    font-family: 'Nimbus Sans Extd', 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #F8F1EC;
}

.wizard-header #companyNameDisplay {
    font-family: 'Nimbus Sans Extd', 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #F8F1EC;
}

.progress-bar {
    width: 100%;
    height: 2px;
    background-color: #594483;
    border-radius: 2px;
    margin: 32px 0 16px 0;
    overflow: hidden;
    position: relative;
}


.wizard-progress {
    margin: 0;
    width: 100%;
}

/* Mobile: Add 16px gap between wizard-nav and progress-bar */
@media (max-width: 767px) {
    .wizard-progress {
        margin-top: 16px;
    }
}


.form-container:not(.wizard) .progress-bar {
    display: none;
}

.code-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.code-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
}

.code-input:focus {
    border-color: white;
    background: white;
    color: #333;
}

.code-separator {
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin: 0 5px;
}

.success-container {
    min-height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding: 40px 20px;
    margin: 0 auto;
}

.success-icon {
    margin-bottom: 32px !important;
}

.success-title {
    font-family: 'Nimbus Sans Extd', 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 30px;
}

.success-amount {
    color: white;
    font-weight: 700;
}

.success-rate {
    color: white;
    font-weight: 700;
}

.success-description {
    font-family: 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: white;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .success-title {
        font-size: 32px;
    }

    .success-description {
        font-size: 18px;
    }

    .success-container {
        padding: 20px;
    }
}

@media (min-width: 769px) {
    .success-container {
        max-height: 540px;
        min-height: auto !important;
        overflow-y: auto;
    }

    /* Remove min-height constraint only when success view is active */
    .form-container:has(#codeEntryView.active) {
        min-height: auto !important;
    }

    /* Fallback for browsers that don't support :has() */
    .form-container.success-active {
        min-height: auto !important;
    }
}

.progress-fill {
    height: 100%;
    background-color: #BDAFDA;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.form-view {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.form-view.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    flex-grow: 0.6;
    display: flex;

    flex-direction: column;
    align-items: unset;
    justify-content: center;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.wizard .form-group {
    padding: 0 32px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: white;
    font-size: 14px;
    width: 100%;
}


.section-heading {
    color: #FFF !important;
    font-family: 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 20px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 22px !important;
    margin-bottom: 16px !important;
    display: block !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    white-space: nowrap !important;
}

.form-group label.input-label {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 14px;
    margin-bottom: 8px;
}

.hint-label {
    color: #BDAFDA;
    font-family: 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px;
    margin-top: 8px;
    display: block;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-top: none;
    border-radius: 8px;
    margin-top: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.search-dropdown.show {
    display: block;
}

.search-dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background-color: #f8f9fa;
}

.search-dropdown-item.selected {
    background-color: #e3f2fd;
    color: #7159A1;
}

.input-with-icon.has-dropdown input {
    border-radius: 8px 8px 0 0;
}

.search-loading {
    padding: 12px 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.wizard .form-group label {
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.wizard .form-group input[type="text"],
.wizard .form-group input[type="tel"] {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 0;
    color: white;
    font-size: 18px;
    padding: 15px 0;
}

.wizard .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.wizard .form-group input:focus {
    border-bottom-color: white;
}

.wizard .form-group input.error {
    border-bottom-color: #FDA29B !important;
}

.form-group input:focus {
    outline: none;
    border-color: #7159A1;
}

.form-group input.error {
    border-color: #FDA29B;
}

.error-message {
    color: #FDA29B;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.company-options {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    width: 100%;
}

.company-option {
    /* Typography */
    color: #988A81;
    font-family: 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;

    /* Layout */
    display: flex;
    min-height: 40px;
    padding: 8px 16px 8px 14px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex: 1 0 0;

    /* Behavior */
    background: transparent;
    border: none;
    cursor: pointer;
}

.company-option.selected {
    /* Typography */
    color: #362951;
    font-family: 'Nimbus Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;

    /* Container */
    background: #FFFBF8;

    /* Layout */
    display: flex;
    min-height: 40px;
    padding: 8px 16px 8px 14px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
}

.company-option:not(.selected):hover {
    background: rgba(255, 251, 248, 0.5);
    color: #362951;
}

.company-option:first-child.selected {
    border-right: 1px solid #DCD2CB;
}

.company-option:last-child.selected {
    border-left: 1px solid #DCD2CB;
}

.input-with-icon {
    position: relative;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
}

.input-with-icon input {
    padding-left: 43px;
}

.input-with-icon.pound-input input {
    padding-left: 36px;
}

.input-with-icon.search-input input {
    padding-left: 43px;
}

.input-with-icon input::placeholder {
    padding-left: 0;
    text-indent: 0;
}

.input-with-icon.pound-input input::placeholder {
    padding-left: 0;
    text-indent: 0;
}

.input-with-icon .search-icon,
.input-with-icon .pound-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-with-icon .search-icon,
.input-with-icon .search-icon svg {
    width: 20px;
    height: 20px;
}

.input-with-icon .pound-icon,
.input-with-icon .pound-icon svg {
    width: 13px;
    height: 20px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 0 32px;
}

.radio-option {
    display: flex;
    align-items: center;
    height: 72px;
    background: rgba(255, 255, 255, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.80);
    border-radius: 8px;
    box-shadow: 0 0 10px 0 rgba(255, 255, 255, 0.35) inset;
    cursor: pointer;
    color: white;
    font-size: 16px;
    justify-content: center;
    text-align: center;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.15);
}

.radio-option.selected {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.radio-option input {
    display: none;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.wizard .form-actions {
    justify-content: center;
    padding: 0 32px;
    position: fixed;
    bottom: max(32px, env(keyboard-inset-height, 32px));
    left: 0;
    right: 0;
    z-index: 11;
}

/* Mobile override for steps 1 & 5 - use relative positioning instead of fixed */
@media (max-width: 767px) {

    #wizardStep1 .form-actions,
    #wizardStep5 .form-actions {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        z-index: auto !important;
        margin: 30px 0 0 0 !important;
        padding: 0 32px !important;
    }

    .form-rounded.rounded {
        border-radius: 24px 24px 0 0;
        margin: 0px;
    }

    .logo.active-logo {
        height: 64px;
        text-align: center;
    }

    .logo img {
        margin: auto;
    }

    .wizard-header .loan-info {
        font-size: 20px;
    }
}

@media (min-width: 768px) {
    .wizard .form-actions {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        z-index: auto;
    }
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wizard .btn {
    width: 100%;
    border-radius: 8px;
}

.form-container:not(.wizard) .btn {
    width: 100%;
    border-radius: 8px;
}

.btn-primary {
    background-color: #7159A1;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #5d4a87;
}

.btn-primary:disabled {
    background-color: rgba(113, 89, 161, 0.3);
    cursor: not-allowed;
    transform: none;
    color: #999;
}

.form-container:not(.wizard) .btn-primary {
    background-color: white;
    color: #7159A1;
}

.form-container:not(.wizard) .btn-primary:hover:not(:disabled) {
    background-color: #f8f9fa;
    color: #7159A1;
}

.form-container:not(.wizard) .btn-primary:disabled {
    background-color: white;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.wizard .btn-primary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: none;
    width: 100%;
    border-radius: 8px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wizard .btn-primary.show {
    display: inline-flex;
}

.wizard .btn-primary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #e1e5e9;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
}

.wizard .btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wizard .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.wizard-question {
    text-align: left;
    margin-bottom: 40px;
    margin-top: 32px;
    padding: 0 32px;
}

.wizard-question h2 {
    font-size: 24px;
    color: white;
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.3;
}

.wizard-disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    margin-top: 30px;
    line-height: 1.4;
    padding: 0 32px;
}

.success-view {
    text-align: center;
    padding: 40px 20px;
}


.success-icon::before {
    content: "";
    color: white;
    font-size: 32px;
    font-weight: bold;
}

.success-title {
    font-size: 24px;
    color: white;
    margin-bottom: 10px;
    text-align: left;
}

.success-message {
    color: #6c757d;
    font-size: 16px;
}

@media (max-width: 767px) {
    .form-container {
        margin: 0;
    }

    .form-container.wizard {
        margin: 0;
        padding: 0;
    }

    .form-header {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }


    .wizard-question {
        text-align: center;
    }

    .wizard-question h2 {
        font-size: 24px;
        font-weight: 700;
        line-height: 26px;
    }

    .wizard .form-group input[type="text"],
    .wizard .form-group input[type="tel"] {
        font-size: 20px;
        line-height: 22px;
    }

    .wizard .form-group input::placeholder {
        font-size: 20px;
        line-height: 22px;
    }

    #submitBtn1,
    #submitBtn5 {
        font-size: 16px;
        font-weight: 600;
        line-height: 22px;

        /* Layout */
        display: flex;
        height: 44px;
        padding: 10px 16px 10px 12px;
        justify-content: center;
        align-items: center;
        gap: 4px;
        align-self: stretch;

        /* Style */
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.80);
        background: rgba(255, 255, 255, 0.20);
        box-shadow: 0 0 0 1px rgba(10, 13, 18, 0.18) inset,
            0 -2px 0 0 rgba(10, 13, 18, 0.05) inset,
            0 1px 2px 0 rgba(10, 13, 18, 0.05);
    }

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

    .btn {
        width: 100%;
    }

    .radio-group {
        gap: 8px;
    }

    .radio-option {
        padding: 10px;
        height: 64px;
    }
}

/* Desktop-specific styling for wizard steps 1 & 5 */
@media (min-width: 768px) {

    /* Override the form-view max-width constraint for wizard steps 1 & 5 */
    #wizardStep1,
    #wizardStep5 {
        max-width: none;
        margin: 0 12.5%;
        width: 75%;
    }

    /* Make wizard step 1 & 5 container elements full width within the 75% container */
    #wizardStep1 .wizard-question,
    #wizardStep5 .wizard-question {
        max-width: 100%;
        margin: 32px 0 40px 0;
    }

    #wizardStep1 .form-group,
    #wizardStep5 .form-group {
        max-width: 100%;
        margin: 0;
    }

    /* Style the hint text next to submit button */
    #wizardStep1 .form-actions,
    #wizardStep5 .form-actions {
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        max-width: 100%;
        margin: 30px 0 0 0;
    }

    #wizardStep1 .btn-primary,
    #wizardStep5 .btn-primary {
        width: auto;
        min-width: 160px;
        display: inline-flex !important;
    }

    .hint-text {
        color: rgba(255, 255, 255, 0.6);
        font-size: 14px;
        font-weight: 400;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .return-key-icon {
        width: 16px;
        height: 16px;
        opacity: 0.6;
    }
}

/* Hide hint text on mobile */
@media (max-width: 767px) {
    .hint-text {
        display: none;
    }
}

/* Make steps 1 & 5 buttons always visible on all screen sizes */
#wizardStep1 .btn-primary,
#wizardStep5 .btn-primary {
    display: inline-flex !important;
}

/* Desktop-specific styling for wizard steps 2, 3 & 4 - grid layout */
@media (min-width: 768px) {

    #wizardStep2,
    #wizardStep3,
    #wizardStep4 {
        max-width: none;
        margin: 0 12.5%;
        width: 75%;
    }

    #wizardStep2 .wizard-question,
    #wizardStep3 .wizard-question,
    #wizardStep4 .wizard-question {
        max-width: 100%;
        margin: 32px 0 40px 0;
        padding: 0;
    }

    #wizardStep2 .radio-group,
    #wizardStep3 .radio-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 16px;
        padding: 0;
        max-width: 100%;
    }

    /* Step 4 has only 2 options, so 1x2 grid */
    #wizardStep4 .radio-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        gap: 16px;
        padding: 0;
        max-width: 100%;
    }

    #wizardStep2 .radio-option,
    #wizardStep3 .radio-option,
    #wizardStep4 .radio-option {
        margin: 0;
    }

    /* Wizard step hint text styling for desktop */
    .wizard-step-hint {
        margin-top: 32px;
        font-size: 24px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.4;
        text-align: left;
        max-width: 100%;
    }
}

/* Hide wizard step hints on mobile */
@media (max-width: 767px) {
    .wizard-step-hint {
        display: none;
    }
}

/* Circular Progress Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid #7159A1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
    display: none;
}

.btn-loading .btn-spinner {
    display: inline-block;
}

.btn-loading {
    pointer-events: none;
    cursor: not-allowed;
}

/* Wizard button spinners (white color for wizard buttons) */
.wizard .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loading state for wizard buttons */
.btn-loading .btn-check {
    display: none;
}

.btn-loading .btn-spinner {
    display: inline-block;
}

/* Radio Button Progress Animation */
@keyframes progressSlide {
    0% {
        width: 0%;
    }

    100% {
        width: 90%;
    }
}

.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.20);
    border-radius: 8px;
    display: none;
    z-index: 1;
}

.radio-option {
    position: relative;
    overflow: hidden;
}

.radio-option.loading .progress-overlay {
    display: block;
    animation: progressSlide 3s ease-out forwards;
}


/* Disabled state for radio groups during loading */
.radio-group.loading .radio-option {
    pointer-events: none;
    cursor: not-allowed;
}

.radio-group.loading .radio-option:not(.loading) {
    opacity: 0.6;
}

.radio-group label {
    padding-top: 4px;
}
/* Ensure progress overlay content stays above */
.radio-option input,
.radio-option label {
    position: relative;
    z-index: 2;
}
