/*!
 * Multi Step Contact Form Styles - Eligibility Quiz
 * 
 * @package Multi_Step_Contact_Form
 * @author Ermias Mesfin Abebe - Leadradiant
 * @copyright 2024 Leadradiant. All rights reserved.
 * @license Proprietary
 */

@import url('https://fonts.googleapis.com/css2?family=Museo+Sans:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'AGATHO';
    src: url('../fonts/AGATHO-Regular.woff2') format('woff2'),
         url('../fonts/AGATHO-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.mscf-container {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Museo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #7DB603; /* Brand green background */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mscf-form-wrapper {
    background: #7DB603;
    min-height: 100vh;
    padding: 60px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Progress Bar Container - Inside Form */
.mscf-progress-bar-container {
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0;
    padding: 20px 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: nowrap;
}

.mscf-progress-bar-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.mscf-progress-bar-line {
    flex: 1;
    height: 4px;
    background: #ffffff;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.mscf-progress-bar-fill {
    height: 100%;
    background: #EF6D24; /* Brand orange fill */
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 8%;
}

.mscf-progress-percentage {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 40px;
    font-family: 'Museo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Form Steps */
.mscf-step {
    display: none;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

.mscf-step-title {
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 40px;
    font-weight: 700;
    text-align: center;
    font-family: 'AGATHO', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mscf-step-question {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: left;
    font-family: 'Museo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mscf-step-description {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
    font-family: 'Museo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Radio Buttons */
.mscf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mscf-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    color: #ffffff;
    padding: 12px 0;
    font-family: 'Museo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mscf-radio {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #EF6D24;
}

/* Checkboxes */
.mscf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mscf-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    color: #ffffff;
    padding: 12px 0;
    font-family: 'Museo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mscf-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #EF6D24;
}

/* Form Groups */
.mscf-form-group {
    margin-bottom: 25px;
}

/* Phone Field Wrapper */
.mscf-phone-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.mscf-phone-code {
    flex: 0 0 120px;
    min-width: 100px;
}

.mscf-phone-number {
    flex: 1;
}

.mscf-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    font-family: 'Museo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mscf-required {
    color: #ffffff;
}

.mscf-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #EF6D24;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Museo Sans', inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.mscf-input::placeholder {
    color: #999999;
}

.mscf-input:focus {
    outline: none;
    border-color: #EF6D24;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(239, 109, 36, 0.1);
}

.mscf-input select {
    background: #ffffff;
    color: #333333;
    cursor: pointer;
}

.mscf-input select option {
    background: #ffffff;
    color: #333333;
}

.mscf-error-message {
    display: block;
    color: #ffeb3b;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

.mscf-input.error {
    border-color: #ffeb3b;
    background: #fff9e6;
}

/* Buttons */
.mscf-button-group {
    display: none; /* Hide inline buttons, use fixed progress bar buttons */
}

.mscf-btn-nav {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mscf-btn-prev-nav {
    background: #EF6D24;
    color: #ffffff;
    font-family: 'Museo Sans', inherit;
}

.mscf-btn-prev-nav:hover {
    background: #d85a1a;
    transform: translateY(-2px);
}

.mscf-btn-next-nav {
    background: #EF6D24;
    color: #ffffff;
    font-family: 'Museo Sans', inherit;
}

.mscf-btn-next-nav:hover {
    background: #d85a1a;
    transform: translateY(-2px);
}

.mscf-btn-submit {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Museo Sans', inherit;
    background: #EF6D24;
    color: #ffffff;
    white-space: nowrap;
}

.mscf-btn-submit:hover {
    background: #d85a1a;
    transform: translateY(-2px);
}

.mscf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Message */
.mscf-message {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 24px 36px;
    border-radius: 12px;
    display: none;
    animation: slideDown 0.3s ease;
    z-index: 1000;
    max-width: 720px;
    width: 90%;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Sticky Quiz Button */
.mscf-sticky-btn {
    position: fixed;
    z-index: 9999;
    bottom: 24px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    opacity: 0.98;
}

.mscf-sticky-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.mscf-sticky-btn--left {
    left: 24px;
}

.mscf-sticky-btn--right {
    right: 24px;
}

.mscf-sticky-btn--center {
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 600px) {
    .mscf-sticky-btn {
        bottom: 14px;
        right: 14px;
        left: auto;
        transform: none;
        width: auto;
        max-width: 70%;
        text-align: center;
        font-size: 12px;
        padding: 8px 14px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    }
}

.mscf-message.success {
    background: #4caf50;
    color: #ffffff;
    display: block;
}

.mscf-message.error {
    background: #f44336;
    color: #ffffff;
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Loading State */
.mscf-btn-submit.loading {
    position: relative;
    color: transparent;
}

.mscf-btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mscf-container {
        min-height: auto;
    }
    
    .mscf-form-wrapper {
        padding: 30px 20px;
        min-height: auto;
        justify-content: flex-start;
    }
    
    .mscf-step {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .mscf-step-title {
        font-size: 26px;
        margin-bottom: 25px;
        line-height: 1.3;
    }
    
    .mscf-step-question {
        font-size: 18px;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    .mscf-step-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .mscf-progress-bar-container {
        max-width: 100%;
        padding: 15px 10px;
        flex-wrap: wrap;
        margin-top: 30px;
    }
    
    .mscf-progress-bar-wrapper {
        order: 2;
        width: 100%;
        margin-top: 15px;
        gap: 10px;
    }
    
    .mscf-progress-bar-line {
        height: 3px;
    }
    
    .mscf-progress-percentage {
        font-size: 13px;
        min-width: 35px;
    }
    
    .mscf-btn-nav {
        padding: 10px 18px;
        font-size: 14px;
        flex: 1;
        min-width: 100px;
    }
    
    .mscf-radio-label,
    .mscf-checkbox-label {
        font-size: 16px;
        padding: 10px 0;
    }
    
    .mscf-radio,
    .mscf-checkbox {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }
    
    .mscf-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .mscf-label {
        font-size: 15px;
    }
    
    .mscf-form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .mscf-form-wrapper {
        padding: 20px 15px;
    }
    
    .mscf-step {
        padding: 0 5px;
    }
    
    .mscf-step-title {
        font-size: 22px;
        margin-bottom: 20px;
        letter-spacing: 0.5px;
    }
    
    .mscf-step-question {
        font-size: 16px;
        margin-bottom: 20px;
        line-height: 1.4;
    }
    
    .mscf-step-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .mscf-progress-bar-container {
        padding: 12px 5px;
        margin-top: 25px;
        gap: 10px;
    }
    
    .mscf-progress-bar-wrapper {
        margin-top: 12px;
        gap: 8px;
    }
    
    .mscf-progress-bar-line {
        height: 3px;
    }
    
    .mscf-progress-percentage {
        font-size: 12px;
        min-width: 32px;
    }
    
    .mscf-btn-nav {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .mscf-radio-label,
    .mscf-checkbox-label {
        font-size: 15px;
        padding: 8px 0;
        line-height: 1.4;
    }
    
    .mscf-radio,
    .mscf-checkbox {
        width: 18px;
        height: 18px;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    .mscf-input {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-width: 2px;
    }
    
    .mscf-label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .mscf-form-group {
        margin-bottom: 18px;
    }
    
    .mscf-phone-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .mscf-phone-code {
        flex: 1;
        width: 100%;
    }
    
    .mscf-phone-number {
        width: 100%;
    }

    .mscf-error-message {
        font-size: 12px;
    }
    
    .mscf-message {
        top: 20px;
        padding: 20px 28px;
        font-size: 1rem;
        width: 95%;
        border-radius: 10px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .mscf-form-wrapper {
        padding: 15px 10px;
    }
    
    .mscf-step-title {
        font-size: 20px;
    }
    
    .mscf-step-question {
        font-size: 15px;
    }
    
    .mscf-btn-nav {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .mscf-progress-percentage {
        font-size: 11px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .mscf-form-wrapper {
        padding: 20px 20px;
        min-height: auto;
    }
    
    .mscf-step-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .mscf-step-question {
        font-size: 17px;
        margin-bottom: 20px;
    }
    
    .mscf-progress-bar-container {
        margin-top: 20px;
        padding: 12px 10px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .mscf-btn-nav {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .mscf-radio-label,
    .mscf-checkbox-label {
        min-height: 44px;
        padding: 12px 0;
    }
    
    .mscf-input {
        min-height: 44px;
    }
}
