/* =========================================================
   Boolean Statement Checker Widget
   Chapter 4.01 Boolean logic and problem statements
   ========================================================= */

.boolean-widget {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #dbeafe;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.boolean-scenario-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.boolean-scenario-tabs button,
.boolean-toggle-btn {
    appearance: none;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: white;
    color: #334155;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.boolean-scenario-tabs button:hover,
.boolean-scenario-tabs button.active,
.boolean-toggle-btn:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: white;
    transform: translateY(-1px);
}

.boolean-scenario-card,
.boolean-result-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem 1.15rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.boolean-scenario-card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.boolean-proposition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.boolean-proposition-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.boolean-proposition-card h4 {
    margin: 0 0 0.5rem;
    color: #0f172a;
}

.boolean-value-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    margin: 0.65rem 0;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.boolean-value-pill.true {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #14532d;
}

.boolean-value-pill.false {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
}

.boolean-expression-label {
    margin: 0.3rem 0 0.35rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.boolean-expression {
    padding: 0.8rem 1rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.45;
}

.boolean-outcome {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.2rem 0 0.7rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.boolean-outcome.true {
    background: #bbf7d0;
    color: #14532d;
}

.boolean-outcome.false {
    background: #fed7aa;
    color: #7c2d12;
}

@media (max-width: 640px) {
    .boolean-widget {
        padding: 1rem;
    }

    .boolean-proposition-grid {
        grid-template-columns: 1fr;
    }
}
