/* assets/css/wizard.css */

.wizard-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.wizard-card {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

/* Stepper */
.wizard-stepper-container {
    padding: 32px 40px 16px;
    border-bottom: 1px solid var(--color-border);
}

.wizard-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.wizard-stepper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.wizard-step-indicator {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.wizard-step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.wizard-step-indicator.active .wizard-step-dot {
    border-color: var(--color-blue);
    background: var(--color-white);
    color: var(--color-blue);
}

.wizard-step-indicator.completed .wizard-step-dot {
    border-color: var(--color-blue);
    background: var(--color-blue);
    color: var(--color-white);
}

.wizard-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: capitalize;
    letter-spacing: 0.02em;
    text-align: center;
}

.wizard-step-indicator.active .wizard-step-label {
    color: var(--color-blue);
}

/* Body Grid */
.wizard-body {
    display: grid;
    grid-template-columns: 1fr 340px;
}

/* Content Left */
.wizard-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.wizard-step {
    display: none;
    flex: 1;
}

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

.wizard-screen {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.wizard-screen.active {
    display: block;
}

.wizard-step-title {
    font-size: 2rem;
    color: var(--color-navy);
    margin-bottom: 8px;
    font-weight: 600;
    font-family: 'Georgia', serif; /* Matching the mockup title style if desired, or keep Inter */
}

.wizard-step-helper {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.wizard-input-group {
    margin-bottom: 24px;
}

.wizard-input-group label {
    display: block;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.wizard-input-group input,
.wizard-input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--color-navy);
    background: var(--color-white);
    transition: all 0.2s;
}

.wizard-input-group input:focus,
.wizard-input-group select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.wizard-input-subtext {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.wizard-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 6px;
    display: none;
}

.wizard-input-group.has-error input,
.wizard-input-group.has-error select {
    border-color: #ef4444;
}
.wizard-input-group.has-error .wizard-error {
    display: block;
}

/* Review Section */
.wizard-review-content {
    background: var(--color-gray-light);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.wizard-review-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.wizard-review-item:last-child {
    border-bottom: none;
}

.wizard-review-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.wizard-review-value {
    color: var(--color-navy);
    font-weight: 600;
}

/* Actions Footer inside content */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.wizard-back {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-navy);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.wizard-back:hover {
    background: var(--color-gray-light);
}

.wizard-next {
    background: var(--color-blue);
    border: none;
    color: var(--color-white);
    padding: 10px 32px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.wizard-next:hover {
    background: #1d4ed8;
}

.wizard-save-progress {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar Right */
.wizard-sidebar {
    background: var(--color-gray-light);
    border-left: 1px solid var(--color-border);
    padding: 40px 32px;
}

.wizard-sidebar-illustration {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 32px;
    display: block;
}

.wizard-sidebar-title {
    font-size: 1.25rem;
    color: var(--color-navy);
    font-weight: 700;
    margin-bottom: 8px;
}

.wizard-sidebar-text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.wizard-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

.wizard-sidebar-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.wizard-sidebar-list-icon {
    color: var(--color-blue);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-sidebar-list-content h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: var(--color-navy);
    font-weight: 600;
}

.wizard-sidebar-list-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.wizard-sidebar-secure {
    background: var(--color-white);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.wizard-sidebar-secure-icon {
    color: var(--color-blue);
}

.wizard-sidebar-secure p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-navy);
    font-weight: 500;
}

/* Card Footer */
.wizard-card-footer {
    padding: 16px 40px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-white);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.wizard-footer-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-footer-edit {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

@media (max-width: 768px) {
    .wizard-body {
        grid-template-columns: 1fr;
    }
    
    .wizard-sidebar {
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
    
    .wizard-content {
        padding: 24px;
    }
    
    .wizard-card-footer {
        padding: 16px 24px;
    }
    
    .wizard-stepper-container {
        padding: 24px 16px 16px;
    }
    
    .wizard-stepper::before {
        display: none;
    }
    
    .wizard-step-label {
        display: none;
    }
    
    .wizard-actions {
        flex-direction: column-reverse;
        gap: 16px;
    }
    
    .wizard-next, .wizard-back {
        width: 100%;
    }
    
    .wizard-save-progress {
        margin-bottom: 16px;
    }
}

/* ---- Responsive Results Grid ---- */
.results-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.results-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
@media (max-width: 640px) {
    .results-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 380px) {
    .results-grid-3 { grid-template-columns: 1fr; }
    .results-grid-2 { grid-template-columns: 1fr; }
}
.result-card {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    position: relative;
    min-width: 0;
}
.result-card-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.3;
}
.result-card-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-navy);
    word-break: break-word;
    line-height: 1.2;
}
@media (max-width: 640px) {
    .result-card-value { font-size: 1.15rem; }
    .result-card { padding: 12px 8px; }
}
/* ---- Info Tooltip ---- */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    font-style: normal;
    user-select: none;
    transition: background 0.2s;
    vertical-align: middle;
}
.info-icon:hover { background: #2563eb; color: white; }
.info-icon .tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    font-size: 0.72rem;
    line-height: 1.45;
    padding: 9px 13px;
    border-radius: 8px;
    width: 220px;
    max-width: 220px;
    text-align: left;
    z-index: 300;
    pointer-events: none;
    font-weight: 400;
    white-space: normal;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.info-icon .tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
}
.info-icon:hover .tip,
.info-icon.tip-open .tip { display: block; }
/* ---- Results layout ---- */
.results-container { max-width: 760px; margin: 0 auto; }
.results-section { margin-bottom: 28px; }
.results-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-gray-light);
}
.verdict-banner {
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}
.verdict-banner .verdict-eyebrow {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}
.verdict-banner .verdict-text {
    font-size: 1.2rem;
    font-weight: 700;
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.comparison-table th {
    text-align: right;
    padding: 6px 0 10px;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--color-border);
}
.comparison-table th:first-child { text-align: left; }
.comparison-table td {
    padding: 11px 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.comparison-table td:not(:first-child) { text-align: right; font-weight: 600; }
.comparison-table tr:last-child td { border-bottom: none; }
.results-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
}
@media (max-width: 640px) {
    .results-card { padding: 16px; }
    .comparison-table { font-size: 0.82rem; }
}

/* ========================================
   Responsive Results Grid
   ======================================== */
.results-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.results-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
@media (max-width: 640px) {
    .results-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 360px) {
    .results-grid-3 { grid-template-columns: 1fr; }
    .results-grid-2 { grid-template-columns: 1fr; }
}
.result-card {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    position: relative;
    min-width: 0;
}
.result-card-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.3;
    flex-wrap: wrap;
}
.result-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy);
    word-break: break-word;
    line-height: 1.2;
}
@media (max-width: 640px) {
    .result-card-value { font-size: 1.05rem; }
    .result-card { padding: 10px 8px; }
}

/* ========================================
   Info Tooltip
   ======================================== */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    font-style: normal;
    user-select: none;
    transition: background 0.2s;
    vertical-align: middle;
    line-height: 1;
}
.info-icon:hover,
.info-icon.tip-open { background: #2563eb; color: white; }
.info-icon .tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    font-size: 0.72rem;
    line-height: 1.45;
    padding: 9px 13px;
    border-radius: 8px;
    width: 220px;
    max-width: 80vw;
    text-align: left;
    z-index: 300;
    pointer-events: none;
    font-weight: 400;
    white-space: normal;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.info-icon .tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
}
.info-icon:hover .tip,
.info-icon.tip-open .tip { display: block; }

/* ========================================
   Results Layout
   ======================================== */
.results-container { max-width: 760px; margin: 0 auto; }
.results-section { margin-bottom: 28px; }
.results-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-gray-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.verdict-banner {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 24px;
    text-align: center;
}
.verdict-banner .verdict-eyebrow {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}
.verdict-banner .verdict-text {
    font-size: 1.15rem;
    font-weight: 700;
}
.results-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 0;
    border: 1px solid var(--color-border);
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.comparison-table th {
    text-align: right;
    padding: 6px 0 10px;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--color-border);
}
.comparison-table th:first-child { text-align: left; }
.comparison-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    color: var(--color-navy);
}
.comparison-table td:not(:first-child) { text-align: right; font-weight: 600; }
.comparison-table tr:last-child td { border-bottom: none; }
@media (max-width: 640px) {
    .results-card { padding: 16px 14px; }
    .comparison-table { font-size: 0.8rem; }
    .comparison-table td { padding: 8px 0; }
}
