/* ═══════════════════════════════════════════════════════════
   IAM Self-Reflection Survey Stylesheet
   ═══════════════════════════════════════════════════════════ */

.survey-page-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    padding-bottom: 140px !important;
}

/* ── Cycle Badge ── */
.survey-cycle-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fef3c7;
    color: #b45309;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E3A14C;
    display: inline-block;
}

/* ── Intro Card ── */
.survey-intro-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 36px;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    border-left: 6px solid #E3A14C;
    display: flex;
    gap: 22px;
}

.intro-icon {
    font-size: 38px;
    line-height: 1;
    flex-shrink: 0;
}

.intro-content p {
    margin-bottom: 12px;
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
}

.intro-content p.lead-text {
    font-size: 16px;
    color: #1e293b;
}

.intro-highlight-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 18px 0;
}

.intro-examples-list {
    margin: 10px 0 0 0;
    padding-left: 20px;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
}

.intro-examples-list li {
    margin-bottom: 6px;
}

.intro-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    font-size: 13.5px;
    color: #64748b;
}

.intro-meta-footer a {
    color: #E3A14C;
    font-weight: 700;
    text-decoration: none;
}

.intro-meta-footer a:hover {
    text-decoration: underline;
}

/* ── Fixed Floating Progress Dock ── */
.survey-progress-sticky {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 920px;
    z-index: 999999;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 14px 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1.5px solid rgba(226, 232, 240, 0.95);
    transition: all 0.3s ease;
}

.progress-bar-container {
    width: 100%;
    height: 9px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3D5561 0%, #E3A14C 100%);
    border-radius: 6px;
    transition: width 0.35s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.auto-save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
}

/* ── Survey Cards ── */
.survey-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 34px;
    margin-bottom: 26px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.survey-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
}

.survey-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 22px;
}

.section-num {
    background: #3D5561;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.card-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

.goal-pill {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: 6px;
}

.instruction-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 18px;
}

/* ── Matrix Rating Questions ── */
.matrix-question-block {
    background: #fafafa;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.matrix-question-block:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.matrix-question-block.error-highlight {
    border-color: #ef4444;
    background: #fef2f2;
}

.question-label {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: block;
    margin-bottom: 12px;
    line-height: 1.4;
}

.required-label::after,
.req-star {
    content: " *";
    color: #ef4444;
    font-weight: bold;
}

.rating-options-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

/* ── Rating Pill Radio Buttons ── */
.rating-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.25;
}

.rating-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-pill:hover {
    border-color: #E3A14C;
    background: #fffbeb;
    color: #b45309;
}

.rating-pill:has(input[type="radio"]:checked) {
    background: #3D5561;
    border-color: #3D5561;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(61, 85, 97, 0.3);
}

/* ── Form Controls ── */
.survey-card-body .form-label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.survey-card-body .sub-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.survey-card-body .form-control,
.survey-card-body .form-select {
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 11px 15px;
    font-size: 14.5px;
    color: #1e293b;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.survey-card-body .form-control:focus,
.survey-card-body .form-select:focus {
    border-color: #E3A14C;
    box-shadow: 0 0 0 4px rgba(227, 161, 76, 0.15);
    outline: none;
}

.survey-card-body textarea.form-control {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* ── Submit Action Card ── */
.survey-submit-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 34px 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.submit-note {
    font-size: 15px;
    color: #334155;
    margin-bottom: 22px;
}

.btn-survey-submit {
    background: linear-gradient(135deg, #3D5561 0%, #202d34 100%);
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: 800;
    padding: 15px 44px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(61, 85, 97, 0.35);
    transition: all 0.25s ease;
}

.btn-survey-submit:hover {
    background: linear-gradient(135deg, #E3A14C 0%, #d48b28 100%);
    box-shadow: 0 8px 24px rgba(227, 161, 76, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-survey-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-clear-draft {
    background: transparent;
    border: none;
    font-size: 12.5px;
    color: #94a3b8;
    cursor: pointer;
    text-decoration: underline;
}

.btn-clear-draft:hover {
    color: #ef4444;
}

.survey-alert {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
    text-align: center;
}

.survey-alert.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ── Success Screen ── */
.survey-success-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.survey-success-card h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
}

.survey-success-card p.lead {
    font-size: 16px;
    color: #475569;
    max-width: 600px;
    margin: 0 auto 24px;
}

.success-details-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    font-size: 14px;
    color: #334155;
    text-align: left;
}

.success-details-box p {
    margin-bottom: 8px;
}

/* ── Responsive Mobile Matrix ── */
@media (max-width: 768px) {
    .survey-intro-card {
        flex-direction: column;
        padding: 20px;
    }

    .survey-card {
        padding: 20px 16px;
    }

    .rating-options-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .rating-pill {
        justify-content: flex-start;
        padding: 10px 14px;
        text-align: left;
    }
}
