/* ===========================================
   Mboko Compare - Page-specific styles
   Uses brand tokens from tokens.css
   Component styles from components.css
   =========================================== */

/* Simple mobile-first solution: ensure hero fills viewport height for vertical centering */
.mboko-hero-centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    width: 100%;
    min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
    align-self: stretch; /* Override container's align-items: center to fill width */
}

.mboko-hero-headline {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    text-align: center;
    margin-bottom: 12px;
}

.mboko-hero-subtext {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 32px;
}

.mboko-trust-text {
    font-size: 14px;
    color: #737373;
    margin-top: 12px;
}

.mboko-hero-centered .mboko-btn-primary {
    width: auto;
    min-width: 220px;
    max-width: 320px;
    padding: 0 32px;
    align-self: center;
}

/* Next actions (W4) */
.mboko-next-actions {
    margin-bottom: var(--space-4);
}

.mboko-link-row {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-3);
    width: 100%;
}

.mboko-link-row > div {
    width: 100%;
}

/* Form page layout */
.mboko-form-page {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
    flex: 1; /* Fill available space in container */
    min-height: 0; /* Allow flex shrinking */
}

.mboko-form-page form {
    width: 100%;
}

.mboko-form-page .mboko-form-group {
    margin-bottom: var(--space-2);
}

.mboko-form-page .mboko-btn-primary {
    width: 100%;
    max-width: none;
}

.mboko-form-page .mboko-helper {
    text-align: center;
    margin-top: var(--space-4);
}

.mboko-processing-page {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
    flex: 1; /* Fill available space in container */
    min-height: 0; /* Allow flex shrinking */
    justify-content: center; /* Center loading content vertically */
}

.mboko-result-page {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
    flex: 1; /* Fill available space in container */
    min-height: 0; /* Allow flex shrinking */
}

.mboko-error-page {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
    flex: 1; /* Fill available space in container */
    min-height: 0; /* Allow flex shrinking */
    justify-content: center; /* Center error content vertically */
}

/* ===========================================
   Intent Selector (W2)
   =========================================== */
.intent-selector {
    background: var(--subtle);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 20px;
}

.intent-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    display: block;
}

.intent-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
}

.intent-option:last-child {
    margin-bottom: 0;
}

.intent-option.selected {
    border-color: var(--text);
    border-width: 2px;
}

.intent-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.intent-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    cursor: pointer;
}

.intent-radio {
    width: 18px;
    height: 18px;
    border: 2px solid var(--muted);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.intent-option.selected .intent-radio {
    border-color: var(--text);
}

.intent-option.selected .intent-radio::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--text);
    border-radius: 50%;
}

.intent-text {
    flex: 1;
}

.intent-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.intent-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

/* ===========================================
   Result Display (W4) - Two Card System (Transfer Types)
   =========================================== */
.mboko-result-primary {
    background: var(--accent);
    color: #ffffff;
    padding: 24px;
    margin-bottom: 16px;
    text-align: center;
}

.mboko-result-primary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.mboko-result-primary-value {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.mboko-result-secondary {
    background: var(--subtle);
    border-top: 3px solid var(--accent);
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.mboko-result-secondary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 4px;
}

.mboko-result-secondary-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.mboko-result-context {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 20px;
    padding: 0 8px;
}

/* Provider Comparison Table */
.mboko-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 13px;
}

.mboko-comparison-table th {
    background: var(--subtle);
    padding: 10px 8px;
    text-align: left;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.mboko-comparison-table th:not(:first-child) {
    text-align: right;
}

.mboko-comparison-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.mboko-comparison-table td:not(:first-child) {
    text-align: right;
}

.mboko-comparison-table .mboko-provider-name {
    font-weight: 500;
}

/* ===========================================
   Breakdown Section (Collapsible)
   =========================================== */
.mboko-breakdown-section {
    margin-bottom: 20px;
}

.mboko-breakdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--subtle);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.mboko-breakdown-toggle:hover {
    background: var(--surface);
}

.mboko-breakdown-toggle-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.mboko-breakdown-toggle[aria-expanded="true"] .mboko-breakdown-toggle-icon {
    transform: rotate(180deg);
}

.mboko-breakdown-content {
    border: 1px solid var(--border);
    border-top: none;
    padding: 12px;
}

.mboko-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.mboko-breakdown-table th,
.mboko-breakdown-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    text-align: left;
}

.mboko-breakdown-table th {
    color: var(--muted);
    font-weight: 500;
}

.mboko-breakdown-table td {
    color: var(--text);
}

.mboko-breakdown-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.mboko-breakdown-table tr:last-child td {
    border-bottom: none;
}

.mboko-breakdown-payer {
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.mboko-breakdown-total {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 2px solid var(--text);
    font-weight: 600;
    font-size: 13px;
}

/* Explanation Box */
.mboko-explanation {
    font-size: 14px;
    color: var(--muted);
    padding: 16px;
    background: var(--subtle);
    border-left: 3px solid var(--accent);
    margin-bottom: 20px;
    line-height: 1.5;
}

.mboko-footnote {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Feedback widget (shape/position from wireframe, colors from momo-page5 tokens) */
.mboko-feedback-widget {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 20px;
}

.mboko-feedback-question {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 12px;
    text-align: center;
}

.mboko-feedback-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.mboko-feedback-btn {
    padding: 12px 28px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
}

.mboko-feedback-btn:hover {
    border-color: var(--muted);
    background: var(--subtle);
}

.mboko-feedback-btn.selected {
    border-width: 2px;
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.mboko-feedback-expand {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.mboko-feedback-disclaimer {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

.mboko-feedback-expand-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    display: block;
    margin-bottom: 8px;
}

.mboko-feedback-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-family: system-ui, -apple-system, sans-serif;
    resize: vertical;
    margin-bottom: 12px;
    color: var(--text);
    background: var(--surface);
}

.mboko-feedback-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.mboko-feedback-submit {
    width: 100%;
    height: 44px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.mboko-feedback-thanks {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    padding: 20px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .mboko-hero-headline {
        font-size: 32px;
    }
    
    .mboko-hero-subtext {
        font-size: 18px;
    }
}
