/* Calculator Container */
.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Tool Title */
.tool-title {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 32px;
}

.tool-description {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Calculator Wrapper */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Input Section */
.calculator-inputs {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

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

.input-with-icon i {
    position: absolute;
    left: 15px;
    color: #64748b;
    font-size: 16px;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    color: #1e293b;
    background: white;
    transition: all 0.3s;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.calculate-btn, .reset-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.reset-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.reset-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* Results Section */
.calculator-results {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.result-card {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
}

.result-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Breakdown Grid */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.breakdown-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.breakdown-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.breakdown-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.breakdown-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

/* Chart Container */
.chart-container {
    margin-top: 25px;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 30px;
    border-radius: 10px;
    border: 2px dashed #cbd5e1;
    color: #64748b;
}

/* Table Container */
.table-container {
    margin-top: 50px;
}

.table-info {
    background: #f0f9ff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0369a1;
    font-size: 14px;
    border-left: 4px solid #0ea5e9;
}

.table-responsive {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 30px;
}

.emi-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.emi-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.emi-table th {
    background: #f8fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    font-size: 14px;
}

.emi-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
}

.emi-table tr:hover {
    background: #f1f5f9;
}

.emi-table tr:last-child td {
    border-bottom: none;
}

/* Info Box */
.info-box {
    background: #f0f9ff;
    padding: 25px;
    border-radius: 12px;
    margin-top: 40px;
    border-left: 4px solid #0ea5e9;
}

.info-box h4 {
    color: #0369a1;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.info-box p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
    font-size: 15px;
}

/* Tenure Buttons */
.tenure-btn {
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.tenure-btn:hover,
.tenure-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.download-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* PDF Loading Overlay */
.pdf-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .calculator-container {
        padding: 0 !important;
    }
    
    .calculator-inputs,
    .button-group,
    .download-buttons,
    .breadcrumb,
    .tenure-options,
    form button {
        display: none !important;
    }
    
    .calculator-results,
    .table-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Horizontal scroll for large tables */
.horizontal-scroll-container {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 5px;
    background: white;
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Table styles for horizontal scroll */
.emi-table {
    min-width: 800px;
    width: 100%;
    border-collapse: collapse;
}

.emi-table th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.emi-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    white-space: nowrap;
}

.emi-table tr:hover {
    background: #f8fafc;
}

/* Remove old table-responsive styles */
.table-responsive {
    max-height: none;
    overflow-y: visible;
}

/* Continuation row */
.continuation-row {
    background: #fff3cd !important;
}

.continuation-row td {
    color: #856404;
    text-align: center;
    padding: 15px !important;
    font-style: italic;
}