/* Rent Tax Calculator - Popup Styles */

/* Font setup 
@font-face {
    font-family: 'David';
    src: url('fonts/david.woff2') format('woff2'),
         url('fonts/david.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
*/

/* Main Popup Overlay */
.rent-tax-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-family: 'David', 'Alef', Arial, sans-serif;
}

/* Popup Content */
.rent-tax-popup-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    direction: rtl;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Close Button */
.rent-tax-close-popup {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #5a5a5a;
    transition: color 0.3s;
    line-height: 1;
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.rent-tax-close-popup:hover {
    color: #1f618d;
    background-color: #f5f5f5;
}

/* Header Styles */
.rent-tax-popup-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.rent-tax-popup-header h3 {
    color: #1f618d;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.rent-tax-calculation-date {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Section Headers */
.rent-tax-user-inputs h4,
.rent-tax-results h4,
.rent-tax-optimal-scheme h4,
.rent-tax-notes h4 {
    color: #333;
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
    font-weight: bold;
}

/* Input Summary Section */
.user-inputs-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-section {
    flex: 1 1 300px;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}


.tax-note {
    font-size: 14px;
    color: #b7950b;
    text-align: right;
    margin-top: 10px;
    margin-bottom: 15px;
    font-style: italic;
}




.input-section h5 {
    color: #1f618d;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    font-weight: bold;
}

.input-section p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.input-section ul {
    margin: 0.5rem 0;
    padding-right: 1.5rem;
}

.input-section li {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

/* Tax Schemes Results Table */
.tax-schemes-results {
    margin-bottom: 2rem;
}

.tax-schemes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.tax-schemes-table th,
.tax-schemes-table td {
    padding: 0.6rem 1rem;
    text-align: right;
    border: none;
    font-size: 1rem;
}

.tax-schemes-table th {
    background-color: #1f618d;
    color: white;
    font-weight: bold;
}

.tax-schemes-table tr:nth-child(even) {
    background-color: #f2f6f9;
}

.tax-schemes-table tr:hover {
    background-color: #e6f0f7;
}

/* Tax Scheme Detail Tabs */
.tax-schemes-tabs {
    margin-top: 2rem;
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab-button {
    padding: 0.8rem 1.2rem;
    background-color: #f0f0f0;
    border: none;
    border-radius: 8px 8px 0 0;
    margin-left: 0.5rem;
    cursor: pointer;
    color: #555;
    font-family: 'David', 'Alef', Arial, sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #1f618d;
    color: white;
}

/* Tab Content Styles */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scheme Details */
.scheme-details {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.scheme-details h5 {
    color: #1f618d;
    font-size: 1.2rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    font-weight: bold;
}

.scheme-details-table {
    width: 100%;
    border-collapse: collapse;
}

.scheme-details-table tr td {
    padding: 0.4rem 0;
    border: none;
    font-size: 0.95rem;
    line-height: 1.4;
}

.scheme-details-table tr td:first-child {
    width: 60%;
}

.scheme-details-table tr td:last-child {
    text-align: left;
    font-weight: 500;
}

.scheme-details-table tr.total-row {
    font-weight: bold;
    border-top: 1px solid #ddd;
    margin-top: 0.5rem;
}

.scheme-details-table tr.total-row td {
    padding-top: 0.8rem;
    color: #1f618d;
    font-size: 1.05rem;
}

/* Depreciation Details */
.depreciation-details {
    margin: 2rem 0;
}

.depreciation-details h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.depreciation-table {
    width: 100%;
    border-collapse: collapse;
}

.depreciation-table th,
.depreciation-table td {
    padding: 0.6rem 1rem;
    text-align: right;
    border: none;
}

.depreciation-table th {
    background-color: #1f618d;
    color: white;
}

.depreciation-table tr:nth-child(even) {
    background-color: #f2f6f9;
}

/* Optimal Scheme */
.optimal-scheme {
    background-color: #f8f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.optimal-scheme-name {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.optimal-scheme-tax {
    font-size: 1.3rem;
    color: #1f618d;
    margin: 0;
}

/* Notes Section */
.rent-tax-notes {
    margin: 2rem 0;
}

.rent-tax-notes ul {
    margin: 0;
    padding-right: 1.5rem;
}

.rent-tax-notes li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Buttons */
.rent-tax-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    border-top: 2px solid #eee;
    padding-top: 2rem;
}

.rent-tax-popup-buttons button {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-family: 'David', 'Alef', Arial, sans-serif;
    background-color: #1f618d;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.rent-tax-popup-buttons button:hover {
    background-color: #164769;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .rent-tax-popup-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .rent-tax-popup-header h3 {
        font-size: 1.5rem;
    }
    
    .input-section {
        flex-basis: 100%;
    }
    
    .tab-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .rent-tax-popup-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .rent-tax-popup-buttons button {
        width: 100%;
    }
}




/* Print Styles */
@media print {
    /* Hide the form completely */
    #rentTaxCalculatorForm, 
    .rent-tax-calculator-form {
        display: none !important;
    }
    
    /* Make sure only the popup content is visible */
    .rent-tax-popup-content {
        position: static;
        overflow: visible;
        box-shadow: none;
        max-height: none;
        width: 100%;
        padding: 0;
    }
    
    /* Hide buttons and close icon */
    .rent-tax-close-popup,
    .rent-tax-popup-buttons,
    .tabs-nav {
        display: none !important;
    }
    
    /* Show all tab content */
    .tab-content {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    /* Ensure the popup overlay is properly displayed */
    .rent-tax-popup-overlay {
        position: static;
        display: block;
        background: none;
    }
    
    /* Add a page header */
    .rent-tax-popup-header {
        padding-top: 1rem;
    }
    
    /* Hide everything else on the page */
    body > *:not(.rent-tax-popup-overlay) {
        display: none !important;
    }
}