/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Calculator Container */
.calculator-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Calculator Controls */
.calculator-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.reset-button {
    background-color: #f8f9fa;
    color: #dc3545;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reset-button:hover {
    background-color: #e9ecef;
}

.info-icon {
    cursor: pointer;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.label-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

label {
    font-weight: 600;
    color: #495057;
}

.info-tooltip {
    position: relative;
    margin-left: 0.5rem;
    cursor: pointer;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 0.875rem;
}

.info-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #007bff;
    outline: none;
}

.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-suffix input {
    padding-right: 2.5rem;
}

.suffix {
    position: absolute;
    right: 1rem;
    color: #6c757d;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-button {
    flex: 1;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.radio-button.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Results Section */
.results-group {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.result-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #212529;
}

.dscr-result {
    background-color: #e8f4f8;
}

.dscr-value {
    color: #28a745;
    font-size: 1.5rem;
}

/* Calculation Details */
.calculation-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.calculation-details h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #495057;
}

.calculation-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.calculation-label {
    font-weight: 600;
}

.total-row {
    font-weight: bold;
}

.dscr-formula {
    margin-top: 1rem;
    font-weight: bold;
    border-bottom: none;
}

.dscr-explanation {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e8f4f8;
    border-radius: 4px;
}

/* Cash Flow Section */
.cash-flow-section {
    margin-top: 2rem;
}

.show-cash-flow-btn {
    width: 100%;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.show-cash-flow-btn:hover {
    background-color: #e9ecef;
}

.chevron-icon {
    transition: transform 0.3s;
}

.show-cash-flow-btn.active .chevron-icon {
    transform: rotate(180deg);
}

.cash-flow-details {
    margin-top: 1rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    
    .calculator-container {
        padding: 1.5rem;
    }
    
    .radio-group {
        flex-direction: column;
    }
}
