/* ===========================================
Life Expectancy Calculator - Tool Specific Styles
=========================================== */

/* Tool Layout */
.lec-box {
 max-width: 900px;
 margin: 0 auto;
}

/* Controls Layout */
.lec-controls {
 display: flex;
 gap: 30px;
 flex-wrap: wrap;
 align-items: stretch;
}

.lec-section {
 flex: 1 1 45%;
 padding: 25px;
 border-radius: 12px;
}

/* Specific Section Styling */
.demographics {
 background: #f0fdf4; /* Light Green */
 border: 1px solid #d1fae5;
}

.lifestyle {
 background: #fefce8; /* Light Yellow/Cream */
 border: 1px solid #fde68a;
}

.lec-section-title {
 font-size: 1.1rem;
 font-weight: 700;
 color: #065f46; /* Dark Green Title */
 margin-bottom: 20px;
 padding-bottom: 8px;
 border-bottom: 2px solid #a7f3d0;
}
.lifestyle .lec-section-title {
 color: #78350f; /* Dark Brown/Yellow Title */
 border-bottom-color: #fcd34d;
}

/* Inputs */
.lec-input-group {
 margin-bottom: 15px;
 display: flex;
 flex-direction: column;
}

.lec-label {
 font-size: 0.95rem;
 font-weight: 600;
 color: #1f2937;
 margin-bottom: 6px;
}

.lec-input, .lec-select {
 padding: 10px;
 border: 1px solid #93c5fd;
 border-radius: 6px;
 font-size: 1.1rem;
 color: #1f2937;
 width: 100%;
 background-color: white;
}
.lec-help-text {
 font-size: 0.8rem;
 color: #4b5563;
 margin-top: 5px;
}

/* Calculate Button */
.lec-btn-calc {
 width: 100%;
 padding: 15px 20px;
 font-size: 1.2rem;
 font-weight: 700;
 border: none;
 border-radius: 8px;
 cursor: pointer;
 background: #ef4444; /* Primary Red Button */
 color: white;
 transition: background 0.2s;
 margin-top: 20px;
}
.lec-btn-calc:hover {
 background: #dc2626;
}

/* --- Results Section --- */

.lec-results-section {
 margin-top: 30px;
 text-align: center;
}

.lec-result-box {
 background: #ffffff;
 padding: 30px;
 border-radius: 10px;
 box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
 border: 2px solid #ef4444;
}

.lec-card-title {
 font-size: 1.1rem;
 text-transform: uppercase;
 color: #991b1b;
 margin-bottom: 10px;
 font-weight: 700;
}

/* Main Remaining Years Display */
.lec-value-main {
 font-size: 4rem;
 font-weight: 800;
 color: #ef4444;
 line-height: 1;
 margin-bottom: 5px;
}
.lec-unit {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 25px;
}

/* Breakdown Display */
.lec-breakdown {
 display: flex;
 justify-content: center;
 gap: 25px;
 flex-wrap: wrap;
 padding-top: 20px;
 border-top: 1px dashed #fcd34d;
}

.lec-breakdown-item {
 text-align: center;
 flex: 1 1 200px;
 padding: 15px;
    border-radius: 8px;
    background: #fefce8;
}

.lec-breakdown-number {
 font-size: 2rem;
 font-weight: 700;
 color: #1f2937;
 line-height: 1.2;
}

.lec-breakdown-unit {
 font-size: 0.9rem;
 color: #4b5563;
 text-transform: uppercase;
 margin-bottom: 5px;
}

/* Adjustment Colors */
.adjustment.positive .lec-breakdown-number {
    color: #10b981; /* Green for positive adjustment */
}
.adjustment.negative .lec-breakdown-number {
    color: #ef4444; /* Red for negative adjustment */
}

/* Responsive Styling */
@media (max-width: 768px) {
 .lec-controls {
  flex-direction: column;
  gap: 15px;
 }
 .lec-section {
  flex-basis: 100%;
 }
 .lec-value-main {
  font-size: 3rem;
 }
 .lec-breakdown {
  flex-direction: column;
 }
}