/* --- 1. Primitive Action Buttons (Always Vibrant) --- */
.btn-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;

    width: 100%;
    padding: 0.9rem 1.5rem;

    background-color: #166534;
    color: #ffffff;

    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;

    border: 2px solid #14532d;
    border-radius: 0.75rem; /* Softer, modern rounding */
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.25);

    cursor: pointer;
    transition:
        background-color 0.15s ease,
        transform 0.1s ease,
        box-shadow 0.15s ease;
}

.btn-green:hover {
    background-color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 101, 52, 0.35);
}

.btn-green:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(22, 101, 52, 0.2);
}

.btn-green:focus-visible {
    outline: 3px solid #4ade80;
    outline-offset: 3px;
}

/* --- 2. Radio Toggle Base (Blue & Red share this smooth primitive) --- */
.btn-blue,
.btn-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    width: 100%;
    padding: 0.85rem 1.2rem;

    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;

    border-radius: 0.75rem; /* Matches smooth pill styling */
    border: 2px solid transparent;

    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

/* Unselected state: Dark neutral surface with subtle border */
.btn-check:not(:checked) + .btn-blue,
.btn-check:not(:checked) + .btn-red {
    background-color: #18181b;
    color: #a1a1aa;
    border-color: #27272a;
}

.btn-check:not(:checked) + .btn-blue:hover,
.btn-check:not(:checked) + .btn-red:hover {
    background-color: #27272a;
    color: #f4f4f5;
    border-color: #3f3f46;
}

/* --- 3. Checked States (Snap into rich color) --- */

/* Checked Blue (Commercial) */
.btn-check:checked + .btn-blue {
    background-color: #1e40af;
    color: #ffffff;
    border-color: #60a5fa;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.4);
    font-weight: 700;
}

/* Checked Red (Residential) */
.btn-check:checked + .btn-red {
    background-color: #b91c1c;
    color: #ffffff;
    border-color: #f87171;
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.4);
    font-weight: 700;
}

/* --- 4. Focus & Accessibility --- */
.btn-check:focus-visible + .btn-blue,
.btn-check:focus-visible + .btn-red {
    outline: 3px solid #3b82f6;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .btn-green,
    .btn-blue,
    .btn-red {
        transition: none;
    }
    .btn-green:hover,
    .btn-green:active {
        transform: none;
    }
}
