/* =================================
   Advance SIP Calculator Styles
   ================================= */

/* --- Main Layout --- */
.asc-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    max-width: 1200px;
    margin: 2rem auto;
}

.asc-input-container {
    flex: 1;
    min-width: 320px;
}

.asc-results-container {
    flex: 1;
    min-width: 320px;
}

/* --- Input Fields & Sliders --- */
.asc-input-group {
    margin-bottom: 25px;
}

.asc-input-group label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.asc-input-group input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* --- jQuery UI Slider Styles --- */
.ui-slider {
    position: relative;
    text-align: left;
    background: #e9e9e9;
    border-radius: 20px;
    height: 6px;
    border: none;
}

.ui-slider .ui-slider-handle {
    position: absolute;
    z-index: 2;
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 50%;
    background: #0073aa; /* WordPress Blue */
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    top: -6px;
    transform: translateX(-50%);
}

.ui-slider .ui-slider-range {
    position: absolute;
    z-index: 1;
    font-size: .7em;
    display: block;
    border: 0;
    background: #00a0d2;
    border-radius: 20px;
}

/* --- Step-up Options --- */
.asc-stepup-type label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
    cursor: pointer;
}

.asc-stepup-option {
    display: none; /* Controlled by JS */
}

/* --- Results Summary Boxes --- */
.asc-summary-boxes {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allows boxes to wrap on smaller screens */
}

.asc-summary-box {
    flex: 1;
    padding: 15px;
    background: #f7f7f7;
    border-radius: 8px;
    text-align: center;
    min-width: 120px;
}

.asc-summary-box span {
    display: block;
    font-size: 0.9em;
    color: #555;
}

.asc-summary-box strong {
    font-size: 1.3em; /* Slightly reduced font size for better fit */
    color: #333;
    word-break: break-all; /* Key fix to prevent overflow */
}

.asc-summary-box.asc-total strong {
    color: #28a745;
    font-size: 1.5em; /* Slightly reduced font size for better fit */
}

/* --- Details Section (Charts & Table) --- */
.asc-details-wrapper {
    width: 100%;
    margin-top: 20px;
}

.asc-chart-container {
    width: 100%;
    max-height: 400px;
    margin-bottom: 30px;
    display: flex; /* Add this line */
    justify-content: center; /* Add this line */
}

.asc-table-container {
    overflow-x: auto;
}

#asc-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    white-space: nowrap; /* Prevents text wrapping in table cells */
}

#asc-schedule-table th,
#asc-schedule-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: right;
}

#asc-schedule-table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

#asc-schedule-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* --- General Headings --- */
h3 {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.4em;
}