/* ===================================================================
   CALCULATOR PAGE — STYLES
   =================================================================== */

/* Tabs */
.calc-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-bento);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.4rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.calc-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.calc-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.calc-tab.active {
    background: rgba(255, 183, 3, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(255, 183, 3, 0.3);
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.1);
}

.calc-tab i {
    font-size: 1.2rem;
}

/* Quick Presets */
.calc-presets {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.presets-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-sans);
}

.presets-label i {
    color: var(--neon-green);
}

.preset-chip {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.preset-chip:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(255, 183, 3, 0.05);
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.1);
}

.preset-chip.active {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(255, 183, 3, 0.1);
}

/* Calculator Body */
.calc-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Form Panel */
.calc-form-panel {
    background: var(--bg-bento);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.calc-form-panel::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255, 183, 3, 0.05), transparent 70%);
    pointer-events: none;
}

.calc-form {
    display: none;
}

.calc-form.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

.calc-form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.calc-form-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    background: rgba(255, 183, 3, 0.08);
    border: 1px solid rgba(255, 183, 3, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--neon-green);
    flex-shrink: 0;
}

.calc-form-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.calc-form-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Calculator-specific form overrides */
.calc-form .form-group {
    margin-bottom: 1.25rem;
}

.calc-form .form-group select {
    appearance: none;
    -webkit-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='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    padding-right: 3rem;
}

/* Button Row */
.calc-btn-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.calc-btn {
    flex: 1;
    padding: 0.9rem 1.5rem !important;
    font-size: 0.95rem !important;
}

.calc-btn-reset {
    padding: 0.9rem 1.5rem !important;
    font-size: 0.95rem !important;
}

/* DoD Display */
.dod-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.dod-bar {
    flex: 1;
    height: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.dod-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dod-value {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--neon-green);
    min-width: 45px;
    text-align: right;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ===================================================================
   RESULTS PANEL
   =================================================================== */

.calc-results-panel {
    position: sticky;
    top: 100px;
}

/* Placeholder */
.results-placeholder {
    background: var(--bg-bento);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 4rem 2.5rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.results-placeholder > i {
    font-size: 4rem;
    color: var(--neon-green);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.results-placeholder h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.results-placeholder p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.placeholder-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.ph-feat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ph-feat i {
    color: var(--neon-green);
    font-size: 1rem;
}

/* Results Display */
.results-display {
    background: var(--bg-bento);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    animation: resultSlideIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.results-display::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 183, 3, 0.06), transparent 50%);
    pointer-events: none;
}

@keyframes resultSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.result-header h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.result-main-value {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--neon-green), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Gauge */
.result-gauge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.result-gauge {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: url(#gaugeGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gauge-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-sans);
    color: var(--neon-green);
}

.gauge-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Result Cards */
.result-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: center;
    transition: var(--transition);
    animation: cardPop 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
}

.result-card:hover {
    border-color: rgba(255, 183, 3, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

@keyframes cardPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.result-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    font-family: var(--font-sans);
}

.result-card-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-sans);
    color: var(--text-main);
}

.result-card-value .unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Action Buttons */
.result-actions {
    display: flex;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.result-action-btn {
    flex: 1;
    padding: 0.8rem 1rem !important;
    font-size: 0.85rem !important;
    text-align: center;
}

/* Copy Toast */
.copy-toast {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--neon-green);
    color: #000;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 10;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===================================================================
   SEO CONTENT — STANDARDS, FAQ
   =================================================================== */

.standards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.standard-card {
    background: var(--bg-bento);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.standard-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.standard-card:hover::before { opacity: 1; }

.standard-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(255, 183, 3, 0.1);
}

.standard-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    background: rgba(255, 183, 3, 0.08);
    border: 1px solid rgba(255, 183, 3, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--neon-green);
    margin-bottom: 1.5rem;
}

.standard-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.standard-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-card {
    background: var(--bg-bento);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    transition: var(--transition);
}

.faq-card:hover {
    border-color: var(--glass-border-hover);
}

.faq-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-card h4 i {
    color: var(--neon-green);
    font-size: 1.3rem;
}

.faq-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.8;
}

/* ===================================================================
   ENGINEERING WARNINGS
   =================================================================== */
.warning-box {
    display: none;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(255, 183, 3, 0.06);
    border: 1px solid rgba(255, 183, 3, 0.2);
    color: #ffe7b0;
    font-size: 0.82rem;
    line-height: 1.65;
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.warning-box.visible { display: block; animation: fadeIn 0.4s ease-out; }
.warning-box i { color: var(--neon-green); margin-right: 0.3rem; }

/* ===================================================================
   CU vs AL COMPARISON TABLE
   =================================================================== */
.comparison-table-wrap {
    display: none;
    margin-top: 1.25rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}
.comparison-table-wrap.visible { display: block; animation: fadeIn 0.4s ease-out; }
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.02);
}
.comparison-table th {
    padding: 0.8rem 1rem;
    text-align: left;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--glass-border);
}
.comparison-table td {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table td.highlight {
    color: var(--neon-green);
    font-weight: 700;
}

/* ===================================================================
   COLLAPSIBLE ASSUMPTIONS
   =================================================================== */
.assumptions-panel {
    margin-top: 1.25rem;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}
.assumptions-panel summary {
    list-style: none;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
}
.assumptions-panel summary::-webkit-details-marker { display: none; }
.assumptions-panel summary:hover { color: var(--neon-green); }
.assumptions-panel summary .toggle-icon { font-size: 1rem; transition: transform 0.3s; }
.assumptions-panel[open] summary .toggle-icon { transform: rotate(180deg); }
.assumptions-body {
    padding: 0 1.25rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.assumptions-body .form-group { margin-bottom: 0; }
.assumptions-body input {
    padding: 0.65rem 1rem;
    min-height: 42px;
    font-size: 0.85rem;
}

/* ===================================================================
   DOWNLOAD REPORT BUTTON
   =================================================================== */
.download-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.download-report-btn:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(255, 183, 3, 0.05);
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.1);
}

/* ===================================================================
   AUTO-CALC INDICATOR
   =================================================================== */
.auto-calc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--neon-green);
    opacity: 0.6;
    font-weight: 500;
    margin-left: auto;
}
.auto-calc-badge .pulse-dot {
    width: 6px; height: 6px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,183,3,0.4); }
    50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(255,183,3,0); }
}

/* ===================================================================
   CALCULATOR RESPONSIVE
   =================================================================== */

@media (max-width: 1024px) {
    .calc-body {
        grid-template-columns: 1fr;
    }
    .calc-results-panel {
        position: static;
    }
    .standards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .calc-tabs {
        border-radius: 20px;
        flex-direction: column;
    }
    .calc-tab {
        border-radius: 14px;
        font-size: 0.82rem;
        padding: 0.8rem 1rem;
    }
    .calc-form-panel {
        padding: 1.5rem;
        border-radius: 20px;
    }
    .results-display,
    .results-placeholder {
        padding: 1.5rem;
        border-radius: 20px;
    }
    .result-main-value {
        font-size: 2.5rem;
    }
    .result-cards {
        grid-template-columns: 1fr;
    }
    .result-actions {
        flex-direction: column;
    }
    .calc-presets {
        justify-content: center;
    }
    .standards-grid {
        grid-template-columns: 1fr;
    }
    .calc-btn-row {
        flex-direction: column;
    }
    .assumptions-body {
        grid-template-columns: 1fr;
    }
    .comparison-table { font-size: 0.75rem; }
    .comparison-table th, .comparison-table td { padding: 0.6rem 0.75rem; }
}



