/* OE Maturity Assessment — Phase 24 */
/* LeanSpace — prefix: mat- */

/* ─── Reset & Base ─────────────────────────────────────────── */
.mat-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
    box-sizing: border-box;
}

/* ─── Header ────────────────────────────────────────────────── */
.mat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.mat-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #1d1d1f;
    line-height: 1.2;
}

.mat-subtitle {
    font-size: 14px;
    color: #6e6e73;
    margin-top: 4px;
}

.mat-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ─── Card ──────────────────────────────────────────────────── */
.mat-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 20px;
    transition: box-shadow 0.2s ease;
}

.mat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* ─── Buttons ───────────────────────────────────────────────── */
.mat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
    line-height: 1.3;
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none;
}

.mat-btn:active {
    transform: scale(0.97);
}

.mat-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.mat-btn-primary {
    background: #0071e3;
    color: #ffffff;
}

.mat-btn-primary:hover:not(:disabled) {
    background: #0077ed;
}

.mat-btn-secondary {
    background: #f0f0f5;
    color: #1d1d1f;
}

.mat-btn-secondary:hover:not(:disabled) {
    background: #e5e5ea;
}

/* ─── Assessment List ───────────────────────────────────────── */
.mat-list-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mat-assessment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.mat-assessment-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.mat-assessment-meta {
    min-width: 0;
}

.mat-assessment-date {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.mat-assessment-status {
    font-size: 13px;
    color: #6e6e73;
    margin-top: 2px;
}

.mat-assessment-title {
    font-size: 13px;
    color: #6e6e73;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mat-assessment-actions {
    flex-shrink: 0;
}

/* ─── Score Badge ───────────────────────────────────────────── */
.mat-score-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    color: #ffffff;
}

.mat-score-badge.mat-score-large {
    width: 72px;
    height: 72px;
    font-size: 22px;
    margin: 8px auto;
}

.mat-score-gray  { background: #8e8e93; }
.mat-score-red   { background: #ff3b30; }
.mat-score-orange { background: #ff9500; }
.mat-score-blue  { background: #0071e3; }
.mat-score-green { background: #34c759; }

/* ─── Overall Card ──────────────────────────────────────────── */
.mat-overall-card {
    text-align: center;
    padding: 28px 20px 24px;
    margin-bottom: 20px;
}

.mat-overall-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6e6e73;
    font-weight: 600;
    margin-bottom: 6px;
}

.mat-overall-desc {
    font-size: 14px;
    color: #3a3a3c;
    margin-top: 10px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ─── Empty State ───────────────────────────────────────────── */
.mat-empty {
    text-align: center;
    padding: 60px 24px;
    color: #6e6e73;
}

.mat-empty-icon {
    font-size: 52px;
    margin-bottom: 16px;
    line-height: 1;
}

.mat-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 10px;
}

.mat-empty-text {
    font-size: 14px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* ─── Wizard ────────────────────────────────────────────────── */
.mat-wizard-container {
    max-width: 640px;
    margin: 0 auto;
}

.mat-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mat-wizard-progress-info {
    font-size: 13px;
    color: #6e6e73;
    font-weight: 500;
}

.mat-back-btn {
    padding: 7px 14px;
    font-size: 13px;
}

.mat-progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e5ea;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 28px;
}

.mat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0071e3, #34aadc);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mat-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 24px;
    letter-spacing: -0.2px;
}

/* ─── Question Group ────────────────────────────────────────── */
.mat-question-group {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.mat-question {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.mat-question-text {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* ─── Radio Scale ───────────────────────────────────────────── */
.mat-radio-group {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.mat-radio-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 10px 4px 8px;
    border-radius: 10px;
    border: 2px solid #e5e5ea;
    background: #f9f9fb;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
    user-select: none;
    min-width: 0;
}

.mat-radio-option:hover {
    border-color: #0071e3;
    background: #f0f7ff;
}

.mat-radio-option:active {
    transform: scale(0.96);
}

.mat-radio-option.selected {
    border-color: #0071e3;
    background: #e8f2fd;
}

.mat-radio-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d1d1d6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #3a3a3c;
    background: #ffffff;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.mat-radio-option.selected .mat-radio-circle {
    border-color: #0071e3;
    background: #0071e3;
    color: #ffffff;
}

.mat-radio-label {
    font-size: 10px;
    color: #6e6e73;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
}

.mat-radio-option.selected .mat-radio-label {
    color: #0071e3;
}

/* ─── Scale Labels Row (below radio group) ──────────────────── */
.mat-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding: 0 2px;
}

.mat-scale-labels span {
    font-size: 10px;
    color: #aeaeb2;
    text-align: center;
    flex: 1;
}

/* ─── Wizard Nav ────────────────────────────────────────────── */
.mat-wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}

.mat-btn-submit {
    padding: 11px 28px;
    font-size: 15px;
}

/* ─── Results Grid ──────────────────────────────────────────── */
.mat-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.mat-radar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 16px;
}

.mat-radar-title,
.mat-dims-title {
    font-size: 14px;
    font-weight: 600;
    color: #3a3a3c;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.mat-radar-wrap canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── Dimensions Table ──────────────────────────────────────── */
.mat-dims-wrap {
    padding: 20px;
}

.mat-dims-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mat-dim-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mat-dim-name {
    font-size: 13px;
    color: #3a3a3c;
    flex: 0 0 140px;
    line-height: 1.3;
}

.mat-dim-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f5;
    border-radius: 4px;
    overflow: hidden;
}

.mat-score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

.mat-score-bar-fill.mat-score-gray   { background: #8e8e93; }
.mat-score-bar-fill.mat-score-red    { background: #ff3b30; }
.mat-score-bar-fill.mat-score-orange { background: #ff9500; }
.mat-score-bar-fill.mat-score-blue   { background: #0071e3; }
.mat-score-bar-fill.mat-score-green  { background: #34c759; }

.mat-dim-score {
    font-size: 13px;
    font-weight: 700;
    color: #1d1d1f;
    flex: 0 0 28px;
    text-align: right;
}

/* ─── AI Recommendations ────────────────────────────────────── */
.mat-ai-recommendations {
    padding: 20px;
    margin-bottom: 20px;
}

.mat-ai-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.mat-ai-icon {
    font-size: 20px;
    line-height: 1;
}

.mat-ai-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.mat-priority-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #f9f9fb;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 3px solid #0071e3;
}

.mat-priority-card:last-child {
    margin-bottom: 0;
}

.mat-priority-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0071e3;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.mat-priority-content {
    flex: 1;
    min-width: 0;
}

.mat-priority-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    line-height: 1.3;
}

.mat-priority-text {
    font-size: 13px;
    color: #3a3a3c;
    line-height: 1.5;
}

/* ─── Toast Notification ────────────────────────────────────── */
#mat-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    display: none;
    white-space: nowrap;
    max-width: calc(100vw - 32px);
    text-align: center;
    transition: opacity 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.mat-toast-info    { background: #1d1d1f; color: #ffffff; }
.mat-toast-success { background: #34c759; color: #ffffff; }
.mat-toast-warning { background: #ff9500; color: #ffffff; }
.mat-toast-error   { background: #ff3b30; color: #ffffff; }

/* ─── Mobile Responsive ─────────────────────────────────────── */
@media (max-width: 700px) {
    .mat-container {
        padding: 16px 12px 40px;
    }

    .mat-title {
        font-size: 20px;
    }

    .mat-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mat-header > .mat-btn,
    .mat-header-actions {
        width: 100%;
    }

    .mat-header-actions {
        flex-direction: column;
    }

    .mat-header-actions .mat-btn {
        width: 100%;
        justify-content: center;
    }

    .mat-results-grid {
        grid-template-columns: 1fr;
    }

    .mat-radar-wrap canvas {
        width: 100%;
    }

    .mat-dim-name {
        flex: 0 0 110px;
        font-size: 12px;
    }

    .mat-radio-group {
        gap: 5px;
    }

    .mat-radio-option {
        padding: 8px 2px 6px;
    }

    .mat-radio-circle {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .mat-radio-label {
        font-size: 9px;
    }

    .mat-wizard-nav {
        gap: 8px;
    }

    .mat-wizard-nav .mat-btn {
        flex: 1;
        justify-content: center;
    }

    .mat-assessment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .mat-assessment-actions {
        width: 100%;
    }

    .mat-assessment-actions .mat-btn {
        width: 100%;
        justify-content: center;
    }

    .mat-step-title {
        font-size: 18px;
    }

    .mat-btn-submit {
        font-size: 14px;
        padding: 10px 18px;
    }

    .mat-priority-card {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .mat-radio-label {
        display: none;
    }

    .mat-radio-circle {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .mat-radio-option {
        padding: 10px 4px;
    }
}
