/* Mobile-First Compact Design */
:root {
    --bg-primary: #ffffff;
    --bg-card: #f8f9fa;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent-blue: #2563eb;
    --accent-amber: #d97706;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* App Container - fits viewport */
.app-container {
    padding: 16px;
    max-width: 400px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Header - compact */
.header {
    text-align: center;
    margin-bottom: 12px;
}

.title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Unified Journey Card */
.journey-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Inputs Section */
.inputs-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.journey-select {
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 10px;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.journey-select:focus {
    border-color: var(--accent-blue);
}

.journey-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Section */
.results-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Unified label styling for all result items */
.result-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Primary results - arrival times (same size as secondary) */
.result-item.primary .result-value {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.result-item.primary .result-value.ship-time {
    color: var(--accent-amber);
}

/* Secondary results - smaller values */
.result-item.secondary .result-value {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.result-item.secondary .result-value.ship-time {
    color: var(--accent-amber);
}

.result-item.secondary .result-value.highlight {
    color: var(--accent-blue);
}

/* Journey Summary - the narrative */
.journey-summary {
    margin-top: 10px;
    padding: 14px;
    background-color: var(--bg-primary);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.journey-summary .persona-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-style: italic;
}

.journey-summary .summary-text {
    font-style: italic;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.empty-state-subtext {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.6;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    gap: 16px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #dc2626;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 12px 16px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
    font-size: 14px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 12px;
}

/* Build info */
.build-info {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
}

.build-info span:first-child {
    font-family: monospace;
}

.build-info .credit {
    font-family: inherit;
}
