/* ==========================================
   RAMP CALCULATOR - NON-CRITICAL CSS
   ========================================== */

/* === INTERACTIVE STATES === */
.mode-label:hover { background: #f8fafc; }
.mode-option input[type="radio"]:checked + .mode-label .radio-circle { box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1); }
.mode-option input[type="radio"]:checked + .mode-label { background: #f5f3ff; }
.mode-option input[type="radio"]:checked + .mode-label .mode-text { color: #5b21b6; }

/* === PREMIUM CARD STYLING === */
.left-panel, .right-panel { 
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08); 
    transition: box-shadow 0.3s ease;
}
.left-panel h2, .right-panel h2 { text-transform: uppercase; letter-spacing: 0.05em; }

/* === INPUT FIELD INTERACTIONS === */
/* FIX: Removed overflow: hidden so dropdowns aren't clipped */
.input-field { display: flex; border: 1px solid #e2e8f0; border-radius: 10px; background: white; transition: all 0.2s; }
.input-field:focus-within { border-color: #8b5cf6; box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); }

/* FIX: Added border-radius to children to maintain rounded corners */
.input-field input { flex: 1; border: none; padding: 12px 16px; font-size: 1rem; font-family: inherit; color: #0f172a; min-width: 0; background: transparent; border-radius: 10px 0 0 10px; }
.input-field input:focus { outline: none; }

.ratio-field .input-prefix { display: flex; align-items: center; padding: 0 14px; background: #f8fafc; border-right: 1px solid #e2e8f0; font-weight: 700; color: #5b21b6; font-size: 1rem; border-radius: 10px 0 0 10px; }

/* FIX: Added border-radius to wrapper */
.custom-select-wrapper { position: relative; border-left: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0; cursor: pointer; user-select: none; border-radius: 0 10px 10px 0; }
.custom-select-trigger { padding: 12px 10px; font-size: 0.8125rem; font-weight: 600; color: #475569; display: flex; align-items: center; justify-content: center; height: 100%; box-sizing: border-box; white-space: nowrap; }
.custom-select-trigger::after { content: '▼'; font-size: 0.6rem; color: #94a3b8; margin-left: 6px; }

/* Dropdown Menu */
.custom-options { position: absolute; top: 100%; right: 0; left: auto; background: white; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); z-index: 100; display: none; margin-top: 4px; min-width: 120px; max-width: 250px; }
.custom-options.open { display: block; }
.custom-option { padding: 10px 16px; font-size: 0.875rem; color: #334155; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.2s; }
.custom-option:hover { background: #f5f3ff; color: #5b21b6; }
.custom-option.selected { background: #ede9fe; font-weight: 600; color: #5b21b6; }

/* === COMPLIANCE WARNING === */
.compliance-warning { display: none; background-color: #fef3c7; color: #92400e; font-size: 0.8125rem; margin-top: 16px; padding: 12px 16px; border-radius: 10px; border: 1px solid #fde68a; font-weight: 500; align-items: center; gap: 8px; line-height: 1.4; }
.compliance-warning::before { content: '⚠️'; font-size: 1rem; flex-shrink: 0; }
.compliance-warning.visible { display: flex; }

/* === DESKTOP COMPACT MODE === */
@media (min-width: 769px) {
    .mode-selector { gap: 4px; margin-bottom: 16px; }
    .mode-label { padding: 6px 10px; }
    .mode-text { font-size: 0.875rem; }
    .radio-circle { width: 16px; height: 16px; margin-right: 10px; }
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .ramp-calc-wrapper { padding: 0 8px; }
    .left-panel, .right-panel { padding: 20px; }
    .diagram-wrapper { min-height: 240px; }
    .custom-options { right: 0; left: auto; }
}

/* === HERO SECTION STYLING === */
.calculator-hero h1 { 
    font-size: 2.25rem; 
    font-weight: 800; 
    margin-bottom: 12px; 
    background: linear-gradient(135deg, #5b21b6, #8b5cf6); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
    line-height: 1.2; 
    letter-spacing: -0.02em; 
}
.calculator-hero p { font-size: 1.0625rem; color: #64748b; max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* === RELATED CALCULATORS STYLING === */
.related-calculators-grid a { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 16px; 
    background: white; 
    border: 1px solid #f1f5f9; 
    border-radius: 10px; 
    text-decoration: none; 
    color: #1e293b; 
    transition: all 0.2s ease; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.related-calculators-grid a:hover { 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}