/* ==========================================
   TRIANGLE AREA CALCULATOR - NON-CRITICAL CSS
   Loaded asynchronously for better performance
   ========================================== */

/* === INTERACTIVE STATES & ANIMATIONS === */
.method-label:hover { background: #f8fafc; }
.method-option input[type="radio"]:checked + .method-label .radio-circle { box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1); }
.method-option input[type="radio"]:checked + .method-label .radio-circle::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 6px; height: 6px; background: white; border-radius: 50%; }
.method-option input[type="radio"]:checked + .method-label { background: #f5f3ff; }
.method-option input[type="radio"]:checked + .method-label .method-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 === */
.input-field { transition: all 0.2s ease; }
.input-field:focus-within { 
    border-color: #8b5cf6; 
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); 
}
.input-field input:focus { outline: none; }
.input-field input.area-input { font-weight: 600; color: #5b21b6; }

/* === DROPDOWN STYLING === */
.custom-select-trigger::after { content: '▼'; font-size: 0.6rem; color: #94a3b8; margin-left: 4px; }
.custom-options { box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); max-width: 250px; }
.custom-option { transition: background 0.2s; overflow: hidden; text-overflow: ellipsis; }
.custom-option:hover { background: #f5f3ff; color: #5b21b6; }
.custom-option.selected { background: #ede9fe; font-weight: 600; color: #5b21b6; }

/* === ERROR MESSAGE STYLING === */
.calc-error::before { content: '⚠️'; font-size: 0.9rem; margin-right: 6px; }

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

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

/* === 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; }

/* === ARTICLE CONTENT STYLING === */
.article-content h2 { 
    font-size: 1.5rem; 
    font-weight: 700; 
    margin-top: 48px; 
    margin-bottom: 16px; 
    color: #1e293b; 
    scroll-margin-top: 100px; 
}
.article-content h3 { 
    font-size: 1.125rem; 
    font-weight: 600; 
    margin-top: 24px; 
    margin-bottom: 12px; 
    color: #1e293b; 
}
.article-content p { 
    margin-bottom: 16px; 
    color: #475569; 
    line-height: 1.7; 
    font-size: 1rem; 
}
.article-content ul { 
    margin-bottom: 16px; 
    padding-left: 20px; 
    color: #475569; 
    line-height: 1.7; 
    font-size: 1rem; 
}
.article-content li { margin-bottom: 8px; }

@media (max-width: 768px) {
    .article-content { padding: 24px 8px 48px; }
    .article-content h2 { font-size: 1.25rem; margin-top: 32px; }
    .article-content h3 { font-size: 1rem; }
    .article-content p, .article-content ul { font-size: 0.95rem; }
}

/* === 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);
}