/* Container Box */
.eng-survey-box {
    max-width: 700px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    border-top: 6px solid #2b6cb0;
    box-sizing: border-box;
}

/* Header */
.eng-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
}
.eng-header h2 {
    margin: 0 0 8px 0;
    color: #1f4e79;
    font-size: 26px;
    font-weight: 800;
}
.eng-header p {
    margin: 0;
    color: #718096;
    font-size: 15px;
}

/* Modern Progress Bar */
.eng-progress-container {
    background-color: #edf2f7;
    border-radius: 999px;
    height: 22px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.eng-progress-bar {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    height: 100%;
    width: 0%; /* Dynamic */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 999px;
}
.eng-progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: bold;
    color: #2d3748;
    z-index: 2;
    pointer-events: none;
}

/* Form Styles */
.eng-form-group {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 8px;
}
.eng-form-group label {
    font-weight: bold;
    color: #4a5568;
    font-size: 14px;
}
.eng-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    background: #f7fafc;
    transition: all 0.2s ease-in-out;
}
.eng-form-group input:focus {
    border-color: #3182ce;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

/* Step Wizard Transitions */
.eng-step {
    display: none;
    opacity: 0;
    transform: scale(0.98) translateY(10px);
    transition: all 0.3s ease-in-out;
}
.eng-step.active {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Card layout for questions */
.eng-q-card {
    background: #f8fbff;
    border: 2px solid #ebf4ff;
    border-right: 5px solid #3182ce;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}
.eng-q-card p {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.8;
}

/* Selection and Textareas */
.eng-q-card select,
.eng-q-card textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.2s;
}
.eng-q-card select:focus,
.eng-q-card textarea:focus {
    border-color: #3182ce;
}

/* Five Star Rating UI - Modern RTL-Safe */
.eng-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    font-size: 38px;
    line-height: 1;
}
.eng-stars input {
    display: none;
}
.eng-stars label {
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.15s ease-in-out, transform 0.1s;
}
.eng-stars label:hover {
    transform: scale(1.15);
}
.eng-stars input:checked ~ label,
.eng-stars label:hover,
.eng-stars label:hover ~ label {
    color: #ecc94b; /* Gold Star color */
}

/* Standard Radio Option Cards */
.eng-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.eng-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 2px solid #edf2f7;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}
.eng-options label:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}
.eng-options input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #3182ce;
    cursor: pointer;
}

/* Navigation Controls Styling */
.eng-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}
.eng-btn-nav {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
}
.eng-prev-btn {
    background-color: #edf2f7;
    color: #4a5568;
}
.eng-prev-btn:hover {
    background-color: #e2e8f0;
}
.eng-next-btn {
    background-color: #3182ce;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.25);
}
.eng-next-btn:hover {
    background-color: #2b6cb0;
}
.eng-submit-btn {
    background-color: #48bb78;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.25);
}
.eng-submit-btn:hover {
    background-color: #38a169;
}

/* Status Notifications */
.eng-res {
    margin-top: 20px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    display: none;
}
.eng-success {
    display: block;
    background-color: #f0fff4;
    color: #38a169;
    border: 1px solid #c6f6d5;
}
.eng-error {
    display: block;
    background-color: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
}

/* Backend Tables & Badges */
.eng-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: bold;
}
.eng-badge-on { background: #c6f6d5; color: #22543d; }
.eng-badge-off { background: #fed7d7; color: #742a2a; }
.eng-codebox {
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: monospace;
    direction: ltr;
    display: inline-block;
}
