/* DGA EMI Calculator Styles - Enhanced with Flex Layout */
.dga-emi-calculator-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    box-sizing: border-box;
}

/* Full Width Container */
.dga-emi-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Form Groups - Improved Layout */
.dga-form-group {
    margin-bottom: 30px;
    width: 100%;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dga-form-group:hover {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dga-form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* Flex Layout for Input and Slider Container */
.dga-flex-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dga-input-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Input Box Styling - Increased Width */
.dga-input-wrapper {
    flex: 1;
    min-width: 250px;
}

.dga-input-group {
    position: relative;
    width: 100%;
}

.dga-input-group input{
    max-width: 140px !important;
    padding: 5px 20px !important;
    margin-left: 20px;
}

.dga-currency-symbol {
    position: absolute;
    /*left: 15px;*/
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #666;
    font-weight: 600;
    z-index: 1;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 6px;
}

.dga-input-group input {
    width: 100%;
    padding: 14px 15px 14px 65px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fff;
}

.dga-input-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Slider Wrapper */
.dga-slider-wrapper {
    flex: 2;
    min-width: 200px;
}

.dga-slider-wrapper input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #4CAF50, #4CAF50, #e0e0e0);
    border-radius: 3px;
    outline: none;
}

.dga-slider-wrapper input[type="range"]:focus {
    outline: none;
}

.dga-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.dga-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #45a049;
}

/* Value Display */
.dga-value-display {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    padding: 0 5px;
}

.dga-current-value {
    font-weight: 700;
    color: #4CAF50;
    background: #e8f5e9;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Tenure Section Special Styling */
.dga-tenure-flex {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.dga-tenure-input-wrapper {
    flex: 1;
    min-width: 200px;
}

.dga-tenure-select-wrapper {
    flex: 0.5;
    min-width: 120px;
}

.dga-tenure-select-wrapper select {
    width: 100%;
    padding: 14px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dga-tenure-select-wrapper select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Interest Rate Section */
.dga-percent-wrapper {
    position: relative;
}

.dga-percent-symbol {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #666;
    font-weight: 600;
}

.dga-percent-wrapper input {
    padding-right: 45px !important;
}

/* Calculate Button */
.dga-calculate-btn {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
	color: #fff !important;
}

.dga-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.dga-calculate-btn:active {
    transform: translateY(0);
}

/* Result Cards */
.dga-emi-result {
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.dga-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dga-result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    color: white;
    text-align: center;
    transition: transform 0.3s ease;
}

.dga-result-card:hover {
    transform: translateY(-5px);
}

.dga-result-card h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
    color:  #fff;
}

.dga-result-amount {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.dga-result-label {
    font-size: 13px;
    margin-top: 10px;
    opacity: 0.8;
}

/* Summary Bar */
.dga-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.dga-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.dga-summary-label {
    font-weight: 600;
    color: #666;
}

.dga-summary-value {
    color: #333;
    font-weight: 700;
}

/* Table Styles */
.dga-table-wrapper {
    margin-top: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.dga-table-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.dga-table-header h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.dga-showing-info {
    font-size: 14px;
    color: #666;
}

.dga-table-responsive {
    overflow-x: auto;
    width: 100%;
}

.dga-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.dga-schedule-table th {
    background: #f5f5f5;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.dga-schedule-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.dga-schedule-table tr:hover {
    background: #f9f9f9;
}

/* Pagination */
.dga-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.dga-pagination button {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #333;
}

.dga-pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.dga-pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.dga-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dga-rows-per-page {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dga-emi-calculator-wrapper {
        padding: 15px;
    }
    
    .dga-form-group {
        padding: 15px;
    }
    
    .dga-input-slider-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .dga-input-wrapper,
    .dga-slider-wrapper {
        width: 100%;
        min-width: auto;
    }
    
    .dga-tenure-flex {
        flex-direction: column;
    }
    
    .dga-tenure-input-wrapper,
    .dga-tenure-select-wrapper {
        width: 100%;
    }
    
    .dga-results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dga-result-amount {
        font-size: 24px;
    }
    
    .dga-summary-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dga-summary-item {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .dga-emi-calculator-wrapper {
        padding: 10px;
    }
    
    .dga-form-group {
        padding: 12px;
    }
    
    .dga-input-group input {
        font-size: 16px;
        padding: 12px 15px 12px 60px;
    }
    
    .dga-currency-symbol {
        font-size: 14px;
        padding: 3px 6px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip */
.dga-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 5px;
    color: #999;
}

.dga-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
}

/* Loading State */
.dga-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.dga-loading .dga-calculate-btn {
    position: relative;
    color: transparent;
}

.dga-loading .dga-calculate-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}