/* --- Variables & Reset --- */
.ag-one-question-trip {
    --ag-primary: #FF8C01;
    /* Orange brand color */
    --ag-primary-hover: #e67e00;
    /* Darker orange */
    --ag-secondary: #0A3C57;
    /* Deep Blue */
    --ag-bg: #ffffff;
    --ag-text: #0A3C57;
    /* Text is now Deep Blue per request */
    --ag-text-muted: #536b7d;
    /* Muted blue-grey */
    --ag-border: #e2e8f0;
    --ag-radius: 12px;
    --ag-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--ag-bg);
    color: var(--ag-text);
    border-radius: var(--ag-radius);
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.ag-one-question-trip * {
    box-sizing: border-box;
    font-family: inherit;
}

/* --- Utilities --- */
.ag-hidden {
    display: none !important;
}

.ag-fade-in {
    animation: agFadeIn 0.3s ease-out forwards;
}

@keyframes agFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Wizard Container --- */
.ag-step-container {
    padding: 2rem;
}

/* --- Headlines --- */
.ag-question-title {
    font-size: 1.6rem;
    /* Increased size */
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.3;
    color: var(--ag-primary);
    /* Changed to Orange */
}

.ag-question-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--ag-text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    display: block;
}

/* --- Risk/Intent Cards (Step 1 & 3) --- */
/* Unified style for both steps per request */
.ag-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 cols on mobile */
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .ag-card-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 cols on desktop usually fits better if we have 8 items */
    }
}

.ag-card-btn {
    all: unset;
    display: flex;
    flex-direction: column;
    /* Stack vertically on mobile too for clarity, or row? */
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
}

/* Mobile tweak: For Intent (Step 1) maybe row is better if text is long? 
   But "same as Step 3" usually means cards. Let's keep cards. */

.ag-card-btn:hover,
.ag-card-btn:focus-visible {
    border-color: var(--ag-primary);
    background: #fff7ed;
    /* Light orange tint */
    box-shadow: var(--ag-shadow);
    transform: translateY(-2px);
}

.ag-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ag-card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ag-text);
}

.ag-card-desc {
    font-size: 0.8rem;
    color: var(--ag-text-muted);
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* --- Slider (Step 2) --- */
.ag-slider-wrapper {
    margin: 3rem 0;
    text-align: center;
}

.ag-slider-input {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #fed7aa, #fb923c, #FF8C01);
    /* Orange gradient */
    outline: none;
    margin: 1.5rem 0;
}

.ag-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ag-primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 3px rgba(255, 140, 1, 0.3);
    cursor: pointer;
    transition: transform 0.1s;
}

.ag-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.ag-energy-display {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ag-primary);
    margin-bottom: 0.5rem;
}

.ag-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--ag-text-muted);
    font-weight: 600;
}

/* --- Month Grid (Step 4) --- */
/* User requested tiles, consistent with others */
.ag-month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 cols on mobile */
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .ag-month-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 cols desktop */
    }
}

.ag-month-btn {
    all: unset;
    display: block;
    text-align: center;
    padding: 1rem 0.5rem;
    background: #f8fafc;
    border: 1px solid var(--ag-border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.ag-month-btn:hover {
    border-color: var(--ag-primary);
    color: var(--ag-primary);
    background: #fff7ed;
}

.ag-month-btn.active {
    background: var(--ag-primary);
    color: #fff;
    border-color: var(--ag-primary);
}

/* --- Navigation Buttons --- */
.ag-nav-actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: space-between;
    /* Space out Back and Next */
    align-items: center;
}

.ag-btn-next {
    background: var(--ag-primary);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 99px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
    margin-left: auto;
    /* Push next to right */
}

.ag-btn-next:hover {
    background: var(--ag-primary-hover);
    transform: translateY(-2px);
}

.ag-btn-back {
    background: transparent;
    color: var(--ag-text-muted);
    padding: 0.75rem 1rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.ag-btn-back:hover {
    color: var(--ag-text);
}

/* --- Results --- */
.ag-result-card {
    background: #fff;
    border-radius: var(--ag-radius);
    border: 1px solid var(--ag-border);
    overflow: hidden;
}

.ag-result-header {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    /* Orange-ish tint */
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--ag-border);
}

.ag-country {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--ag-text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ag-region {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ag-secondary);
    /* Deep Blue */
    margin: 0;
    line-height: 1.1;
}

.ag-result-body {
    padding: 2rem;
}

.ag-why-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.ag-why-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.ag-why-icon {
    color: var(--ag-primary);
    /* Orange check */
    margin-right: 0.75rem;
    font-weight: bold;
}

.ag-meta-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.ag-meta-row {
    display: flex;
    margin-bottom: 0.5rem;
}

.ag-meta-label {
    font-weight: 700;
    min-width: 70px;
    color: var(--ag-secondary);
}

.ag-cta-wrapper {
    text-align: center;
}

.ag-cta-main {
    display: inline-block;
    width: 100%;
    background: var(--ag-primary);
    color: #fff;
    padding: 1rem;
    border-radius: 99px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.ag-cta-main:hover {
    background: var(--ag-primary-hover);
    transform: translateY(-2px);
}

.ag-btn-restart {
    background: none;
    border: none;
    color: var(--ag-text-muted);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.ag-alternative {
    margin-top: 2rem;
    border-top: 2px dashed var(--ag-border);
    padding-top: 1.5rem;
}

.ag-alt-title {
    text-align: center;
    color: var(--ag-text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* --- Debug Panel --- */
.ag-debug-panel {
    margin-top: 3rem;
    background: #1e293b;
    color: #4ade80;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
}

.ag-debug-title {
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.ag-debug-copy-btn {
    background: #334155;
    border: 1px solid #475569;
    color: #fff;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.7rem;
}

.ag-score-positive {
    color: #4ade80;
}

.ag-score-negative {
    color: #f87171;
}