/* freecalc.css - Isolated styling for the Financial Calculators */

.fc-wrapper {
    margin-top: 30px;
    border-top: 2px solid #f0f2f5;
    padding-top: 25px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Form Controls */
.fc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: flex-start;
}

.fc-input-group {
    display: flex;
    flex-direction: column;
}

.fc-input-group label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-input-group input[type="text"],
.fc-input-group input[type="number"],
.fc-input-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    color: #333;
    transition: border-color 0.2s;
    background: #fff;
    width: 100%;
}

.fc-input-group input[type="text"]:focus,
.fc-input-group input[type="number"]:focus,
.fc-input-group select:focus {
    outline: none;
    border-color: #2c5364;
    box-shadow: 0 0 0 2px rgba(44, 83, 100, 0.2);
}

.fc-input-group input[type="range"] {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

/* Dynamic List Rows (For Debts) */
.fc-dynamic-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 10px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    border-left: 4px solid #dc3545;
}

.fc-dynamic-row .fc-input-group {
    flex: 1;
    min-width: 80px;
}

.fc-remove-btn {
    background: transparent;
    color: #dc3545;
    border: 1px dashed #dc3545;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    height: 42px; /* Matches input height */
}

.fc-remove-btn:hover {
    background: #dc3545;
    color: white;
}

/* Range Slider Specifics */
.fc-range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fc-range-val {
    font-weight: bold;
    color: #2c5364;
    font-size: 14px;
}

/* Force Graph Bounds to prevent Chart.js Distortion */
.fc-graph-card {
    min-height: 450px !important;
    display: flex;
    flex-direction: column;
}

.fc-graph-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 350px; /* Crucial to prevent squashing */
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .fc-grid {
        grid-template-columns: 1fr;
    }
    .fc-dynamic-row {
        flex-direction: column;
        align-items: stretch;
    }
    .fc-remove-btn {
        margin-top: 10px;
    }
}