
/* =========================================================
   Finance Deposit Calculator
   Main Calculator Styling
   ========================================================= */

.dgd-fd-calculator {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #222;
}


/* =========================================================
   HEADER
   ========================================================= */

.dgd-fd-header {
    margin-bottom: 25px;
}

.dgd-fd-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.3;
}

.dgd-fd-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
   MAIN GRID
   ========================================================= */

.dgd-fd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: stretch;
}


/* =========================================================
   INPUT CARD
   ========================================================= */

.dgd-fd-input-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dgd-fd-field {
    margin-bottom: 25px;
}

.dgd-fd-field:last-child {
    margin-bottom: 0;
}

.dgd-fd-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
}


/* =========================================================
   INPUT GROUP
   ========================================================= */

.dgd-fd-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.dgd-fd-input-group span {
    padding: 0 12px;
    font-weight: 600;
    color: #555;
}

.dgd-fd-input-group input {
    flex: 1;
    width: 100%;
    border: 0;
    outline: none;
    padding: 12px;
    font-size: 16px;
    background: transparent;
}

.dgd-fd-input-group input:focus {
    outline: none;
}

.dgd-fd-field select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
}

/* =====================================================
   COMPOUNDING FREQUENCY
   ===================================================== */

.dgd-fd-input-group select {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    padding: 12px;
    font-size: 16px;
    color: #222;
    cursor: pointer;
    appearance: auto;
}

.dgd-fd-input-group select:focus {
    outline: none;
}

.dgd-fd-input-group select option {
    font-size: 16px;
    padding: 8px;
}



/* =========================================================
   SLIDERS
   ========================================================= */

.dgd-fd-field input[type="range"] {
    width: 100%;
    margin-top: 14px;
    cursor: pointer;
}


/* =========================================================
   RESULTS
   ========================================================= */

.dgd-fd-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.dgd-fd-result-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 130px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dgd-fd-title {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.dgd-fd-result-card h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
}


/* =========================================================
   CHART
   ========================================================= */

.dgd-fd-chart-section {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dgd-fd-chart-section h3 {
    margin: 0 0 20px;
    font-size: 20px;
}

.dgd-fd-chart-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.dgd-fd-summary {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 25px;
}

.dgd-fd-summary-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}

.dgd-fd-summary-item span {
    display: block;
    color: #666;
    font-size: 13px;
    margin-bottom: 7px;
}

.dgd-fd-summary-item strong {
    display: block;
    font-size: 17px;
}


/* =========================================================
   ACTION BAR
   ========================================================= */

.dgd-fd-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.dgd-fd-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
}

.dgd-fd-btn:hover {
    background: #f3f4f6;
}


/* =========================================================
   TABLE SECTION
   ========================================================= */

.dgd-fd-table-section {
    margin-top: 25px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dgd-fd-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.dgd-fd-table-header h3 {
    margin: 0;
    font-size: 20px;
}

.dgd-fd-year-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dgd-fd-year-selector label {
    font-size: 14px;
    font-weight: 600;
}

.dgd-fd-year-selector select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
}


/* =========================================================
   TABLE
   ========================================================= */

.dgd-fd-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.dgd-fd-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.dgd-fd-table th,
.dgd-fd-table td {
    border: 1px solid #e5e7eb;
    padding: 11px 12px;
    text-align: right;
}

.dgd-fd-table th {
    background: #f8fafc;
    font-weight: 600;
}

.dgd-fd-table th:first-child,
.dgd-fd-table td:first-child {
    text-align: center;
}


/* =========================================================
   TABLE RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .dgd-fd-grid {
        grid-template-columns: 1fr;
    }

    .dgd-fd-summary {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .dgd-fd-calculator {
        padding: 0 10px;
    }

    .dgd-fd-header h2 {
        font-size: 23px;
    }

    .dgd-fd-input-card,
    .dgd-fd-chart-section,
    .dgd-fd-table-section {
        padding: 18px;
    }

    .dgd-fd-results {
        grid-template-columns: 1fr;
    }

    .dgd-fd-summary {
        grid-template-columns: 1fr;
    }

    .dgd-fd-table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dgd-fd-action-bar {
        flex-direction: column;
    }

    .dgd-fd-btn {
        width: 100%;
    }

    .dgd-fd-chart-wrapper {
        height: 280px;
    }

}


.dgd-fd-chart-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
}

.dgd-fd-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 600px) {

    .dgd-fd-chart-wrapper {
        height: 280px;
    }

}