/* assets/css/calculators/compound-interest-calculator.css */

/* Widget Container */
.ci-widget-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Calculator Form */
.calculator-form {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.input-wrapper {
    margin-bottom: 1.5rem;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.input-header label {
    font-weight: 600;
    color: var(--text-main);
}

.input-field,
select.input-field {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.currency-select {
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    background-color: #f1f5f9;
    cursor: pointer;
    color: #334151;
}

.calc-action-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    margin-top: 10px;
}

.calc-action-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* --- RESULT DASHBOARD --- */
.result-container {
    margin-top: 2rem;
    display: none;
    animation: slideUp 0.5s ease-out;
}

/* 1. Hero Card (Future Value) */
.hero-card {
    background: #1e293b;
    color: #fff;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.hero-value {
    font-size: 3rem;
    font-weight: 800;
}

/* 2. Breakdown Grid */
.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: #eff6ff;
    color: var(--primary);
}

.stat-icon.orange {
    background: #fff7ed;
    color: #f97316;
}

.stat-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

.stat-info p {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Donut Chart */
.chart-wrapper {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@property --p {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}

.donut-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(#f97316 var(--p), var(--primary) 0);
    position: relative;
    margin-bottom: 15px;
    transition: --p 1s ease-out;
}

.donut-hole {
    width: 110px;
    height: 110px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
}

.chart-legend {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.blue {
    background: var(--primary);
}

.dot.orange {
    background: #f97316;
}

/* --- TABLE SECTION --- */
.table-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.export-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.export-btn:hover {
    background-color: #059669;
}

.data-table-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 500px;
}

.data-table th {
    text-align: right;
    padding: 12px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}

.data-table th:first-child {
    text-align: left;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
    color: #334155;
}

.data-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #1e293b;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}