/* assets/css/calculator.css */

.sp-calc-container {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.05);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sp-calc-header {
    background: linear-gradient(135deg, #1a202c 0%, #0b132b 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.sp-calc-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.sp-calc-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.sp-calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .sp-calc-layout {
        grid-template-columns: 1fr;
    }
}

.sp-calc-inputs-panel {
    padding: 30px;
    border-right: 1px solid #e2e8f0;
}

.sp-calc-results-panel {
    padding: 30px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

/* ── Form Controls ─────────────────────────────────────────────────────────── */
.sp-calc-group {
    margin-bottom: 22px;
}

.sp-calc-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.sp-calc-group input,
.sp-calc-group select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    color: #1e293b;
    box-sizing: border-box;
    transition: all 0.2s;
}

.sp-calc-group input:focus,
.sp-calc-group select:focus {
    border-color: #f0a500;
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.15);
}

.sp-calc-group small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 4px;
}

.sp-calc-btn {
    background: #f0a500;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
}

.sp-calc-btn:hover {
    background: #e8920a;
}

/* ── Placeholder Panel ─────────────────────────────────────────────────────── */
#sp-calc-placeholder {
    text-align: center;
    color: #64748b;
    padding: 40px;
}

.sp-calc-icon-wrapper {
    margin-bottom: 15px;
}

/* ── Results Output Display ────────────────────────────────────────────────── */
.sp-calc-result-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.sp-calc-status-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 8px;
}

.sp-calc-status-badge.safe {
    background: #dcfce7;
    color: #15803d;
}

.sp-calc-status-badge.unsafe {
    background: #fee2e2;
    color: #b91c1c;
}

#sp-calc-rec-name {
    margin: 0;
    font-size: 18px;
    color: #f0a500;
    font-weight: 700;
}

.sp-calc-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.sp-calc-metric-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.sp-calc-metric-card .label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.sp-calc-metric-card .value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #0f243b;
}

/* ── SVG Drawing Container ────────────────────────────────────────────────── */
.sp-calc-drawing-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.sp-calc-drawing-container h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

#sp-calc-svg-drawing {
    text-align: center;
    background: #fafaf9;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 160px;
}

.sp-calc-actions {
    display: flex;
    gap: 15px;
}

.sp-calc-apply-btn {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.sp-calc-apply-btn:hover {
    background: #059669;
}
