/* Container & Wrapper */
.ef-form-wrapper {
    max-width: 650px;
    margin: 20px auto;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Progress Bar */
.ef-progress-wrapper {
    margin-bottom: 20px;
}
.ef-progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.ef-progress-container {
    width: 100%;
    height: 6px;
    background: #e0e4e8;
    border-radius: 10px;
    overflow: hidden;
}
.ef-progress-bar {
    height: 100%;
    background: #0073aa;
    width: 0%; 
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section Card */
.ef-section-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid #e0e4e8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.ef-section-title {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 1.15rem;
    color: #2c3e50;
    font-weight: 700;
}

/* Field Groups */
.ef-field-group {
    margin-bottom: 20px;
}
.ef-main-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* RESTORED ORIGINAL BORDER DESIGN */
.ef-field-group input[type="text"], 
.ef-field-group input[type="number"], 
.ef-field-group textarea,
.ef-field-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e4e8; /* The original light gray border */
    border-radius: 8px; /* The original rounded corners */
    background-color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ef-field-group input:focus, 
.ef-field-group textarea:focus,
.ef-field-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* 1-5 Rating Scale - Perfect Alignment */
.ef-rating-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    gap: 15px;
}
.ef-rating-text-label {
    font-size: 0.8rem;
    color: #64748b;
    width: 100px;
    line-height: 1.2;
    flex-shrink: 0;
}
.ef-rating-text-label:first-child { text-align: right; }
.ef-rating-text-label:last-child { text-align: left; }
.ef-rating-options { display: flex; gap: 8px; }
.ef-rating-item input { display: none; }
.ef-rating-item span {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}
.ef-rating-item input:checked + span {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Radio & Checkbox Styling */
.ef-option-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
.ef-option-item input {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

/* Navigation Buttons Row */
.ef-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    gap: 10px;
}
.ef-btn-wrapper { flex-grow: 1; }
.ef-next-btn, .ef-submit-btn, .ef-prev-btn {
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    line-height: 1;
}
.ef-next-btn, .ef-submit-btn { width: 100%; border: none; }
.ef-prev-btn { background: none; border: 1px solid #cbd5e1; color: #64748b; min-width: 90px; }

/* MOBILE OPTIMIZATION - Labels on Top, Numbers on Bottom */
@media screen and (max-width: 600px) {
    .ef-form-wrapper { 
        padding: 0 !important; 
        margin: 10px 8px !important; 
        max-width: calc(100% - 16px); 
    }

    .ef-section-card { 
        padding: 15px 12px !important; 
        border-radius: 8px; 
        margin-bottom: 12px; 
    }

    /* Keep horizontal Yes/No for efficiency */
    .ef-option-item {
        display: inline-flex !important;
        margin-right: 20px;
        font-size: 0.9rem;
    }

    /* RATING SYSTEM: Strategic Row Stacking */
    .ef-rating-container {
        display: flex !important;
        flex-wrap: wrap !important; /* Allows multi-row layout */
        justify-content: space-between !important;
        padding: 12px 10px !important;
        background-color: #f8fafc;
        border-radius: 10px;
        gap: 0 !important;
    }

    .ef-rating-text-label {
        width: 50% !important; /* Allocates half the row to each label */
        font-size: 0.75rem !important;
        font-weight: 700;
        margin-bottom: 12px !important; /* Space between labels and numbers */
        color: #64748b;
        flex-shrink: 0;
    }

    /* Anchor labels to their respective ends of the scale */
    .ef-rating-text-label:first-child { 
        text-align: left !important; 
        order: 1; 
    }
    .ef-rating-text-label:last-child { 
        text-align: right !important; 
        order: 2; 
    }

    /* Numbers Row - Positioned below the labels */
    .ef-rating-options {
        width: 100% !important;
        order: 3;
        display: flex !important;
        justify-content: space-between !important; /* Spreads 1-5 evenly */
        margin-top: 5px;
    }

    .ef-rating-item span {
        width: 42px; /* Large, easy-to-tap target for mobile users */
        height: 42px;
        font-size: 1rem;
        background: #ffffff;
        border: 2px solid #cbd5e1;
        border-radius: 50%;
    }
}