/**
 * Brotherhood Paper - Scoring Channel Calculator
 * Styles matching brand guidelines
 * Version 1.0.0
 */

/* ========================================
   CSS Variables / Brand Colors
======================================== */
.bh-scoring-tool {
    --bh-navy: #1B2130;
    --bh-gold: #D4AF37;
    --bh-beige: #E8E9EA;
    --bh-success: #6E815C;
    --bh-white: #FFFFFF;
    --bh-black: #000000;
    --bh-error: #C44536;
    --bh-warning: #E07A30;
    --bh-info: #3B82F6;
    
    --bh-shadow: 0 2px 8px rgba(27, 33, 48, 0.1);
    --bh-shadow-lg: 0 4px 16px rgba(27, 33, 48, 0.15);
    --bh-radius: 8px;
    --bh-radius-lg: 12px;
    --bh-transition: all 0.2s ease;
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.bh-scoring-tool *,
.bh-scoring-tool *::before,
.bh-scoring-tool *::after {
    box-sizing: border-box;
}

/* ========================================
   Locked State
======================================== */
.bh-locked-card {
    background: var(--bh-white);
    border: 2px solid var(--bh-beige);
    border-radius: var(--bh-radius-lg);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--bh-shadow);
}

.bh-lock-icon {
    color: var(--bh-gold);
    margin-bottom: 20px;
}

.bh-lock-title {
    color: var(--bh-navy);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.bh-lock-desc {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 24px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Tool Header
======================================== */
.bh-tool-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--bh-beige);
}

.bh-tool-title {
    color: var(--bh-navy);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.bh-tool-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* ========================================
   Buttons
======================================== */
.bh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--bh-radius);
    cursor: pointer;
    transition: var(--bh-transition);
    text-decoration: none;
}

.bh-btn-primary {
    background: var(--bh-gold);
    color: var(--bh-navy);
}

.bh-btn-primary:hover {
    background: var(--bh-success);
    color: var(--bh-white);
}

.bh-btn-secondary {
    background: var(--bh-beige);
    color: var(--bh-navy);
}

.bh-btn-secondary:hover {
    background: #D5D6D7;
}

/* ========================================
   Form Styles
======================================== */
.bh-form {
    background: var(--bh-white);
    border: 1px solid var(--bh-beige);
    border-radius: var(--bh-radius-lg);
    padding: 24px;
    box-shadow: var(--bh-shadow);
}

.bh-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.bh-form-group {
    display: flex;
    flex-direction: column;
}

.bh-form-group.bh-full-width {
    grid-column: 1 / -1;
}

.bh-label {
    color: var(--bh-navy);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.bh-required {
    color: var(--bh-error);
}

.bh-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #CCC;
    border-radius: var(--bh-radius);
    background: var(--bh-white);
    color: var(--bh-navy);
    transition: var(--bh-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231B2130' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.bh-select:focus {
    outline: none;
    border-color: var(--bh-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Toggle Group */
.bh-toggle-group {
    display: flex;
    gap: 16px;
}

.bh-toggle-three {
    flex-wrap: wrap;
}

.bh-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--bh-navy);
    cursor: pointer;
}

.bh-toggle-label input[type="radio"] {
    accent-color: var(--bh-gold);
    width: 16px;
    height: 16px;
}

/* Form Actions */
.bh-form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid var(--bh-beige);
}

/* ========================================
   Results Section
======================================== */
.bh-results-section {
    margin-top: 32px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Info Card */
.bh-info-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #EBF5FF;
    border: 1px solid #93C5FD;
    border-radius: var(--bh-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.bh-info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bh-info-content {
    color: #1E40AF;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Recommendation Card */
.bh-recommendation-card {
    background: linear-gradient(135deg, var(--bh-navy) 0%, #2A3444 100%);
    border-radius: var(--bh-radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--bh-shadow-lg);
    margin-bottom: 20px;
}

.bh-rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bh-rec-label {
    color: var(--bh-beige);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bh-rec-value {
    margin-bottom: 16px;
}

.bh-channel-width {
    color: var(--bh-gold);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.bh-unit {
    color: var(--bh-beige);
    font-size: 1.5rem;
    font-weight: 500;
    margin-left: 4px;
}

.bh-rec-safe-range {
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.bh-safe-label {
    color: var(--bh-beige);
    font-size: 0.85rem;
    margin-right: 8px;
}

.bh-safe-value {
    color: var(--bh-white);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Risk Badge */
.bh-risk-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.bh-risk-badge.risk-low {
    background: var(--bh-success);
    color: var(--bh-white);
}

.bh-risk-badge.risk-medium {
    background: var(--bh-gold);
    color: var(--bh-navy);
}

.bh-risk-badge.risk-high {
    background: var(--bh-warning);
    color: var(--bh-white);
}

.bh-risk-badge.risk-critical {
    background: var(--bh-error);
    color: var(--bh-white);
}

/* Caliper Card */
.bh-caliper-card {
    background: var(--bh-beige);
    border-radius: var(--bh-radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.bh-caliper-header {
    color: var(--bh-navy);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bh-caliper-value {
    color: var(--bh-navy);
    font-size: 1.5rem;
    font-weight: 700;
}

.bh-caliper-range {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
    margin-left: 8px;
}

/* Explanation Section */
.bh-explanation-section {
    background: var(--bh-white);
    border: 1px solid var(--bh-beige);
    border-radius: var(--bh-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.bh-section-title {
    color: var(--bh-navy);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.bh-explanation-text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Warning Card */
.bh-warning-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FEF3CD;
    border: 1px solid #F0AD4E;
    border-left: 4px solid var(--bh-warning);
    border-radius: var(--bh-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.bh-warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bh-warning-text {
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Summary Table */
.bh-summary-section {
    background: var(--bh-white);
    border: 1px solid var(--bh-beige);
    border-radius: var(--bh-radius);
    padding: 20px;
}

.bh-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.bh-summary-table tr:not(:last-child) {
    border-bottom: 1px solid var(--bh-beige);
}

.bh-summary-table td {
    padding: 10px 0;
}

.bh-sum-label {
    color: #666;
    font-size: 0.9rem;
    width: 40%;
}

.bh-sum-value {
    color: var(--bh-navy);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .bh-scoring-tool {
        padding: 16px;
    }
    
    .bh-form-grid {
        grid-template-columns: 1fr;
    }
    
    .bh-tool-title {
        font-size: 1.5rem;
    }
    
    .bh-channel-width {
        font-size: 2.5rem;
    }
    
    .bh-form-actions {
        flex-direction: column;
    }
    
    .bh-btn {
        width: 100%;
    }
    
    .bh-rec-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .bh-toggle-group {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .bh-locked-card {
        padding: 32px 20px;
    }
    
    .bh-lock-title {
        font-size: 1.4rem;
    }
    
    .bh-form {
        padding: 16px;
    }
    
    .bh-recommendation-card {
        padding: 24px 16px;
    }
}
