/* Down Payment Calculator Specific Styles */

/* Select Dropdown Arrow */
select.input-control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background: white url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23333333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}

/* Optional Label */
.optional-label {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

/* Results Section */
.results-section {
    padding: 0;
    border: none;
    margin-bottom: 16px;
}

/* Savings Goal Highlight Section */
.savings-highlight {
    background: linear-gradient(to bottom right, #003049, #00436b);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    color: white;
}

.goal-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    text-align: center;
}

.goal-item {
    padding: 16px;
}

.goal-item.full-width {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(186, 230, 253, 0.2);
    margin-top: 8px;
    padding-top: 24px;
}

.goal-item h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #bae6fd;
    font-weight: 500;
}

.goal-amount {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

.goal-amount.highlight {
    font-size: 36px;
    color: #7dd3fc;
}

.goal-label {
    font-size: 13px;
    color: #bae6fd;
}

/* Progress Bar */
.progress-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(186, 230, 253, 0.2);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #bae6fd;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(to right, #7dd3fc, #22d3ee);
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease;
}

/* Details Section */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.details-column h4 {
    color: #003049;
    margin-bottom: 16px;
    font-size: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #bae6fd;
}

.detail-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
    align-items: start;
}

.detail-item span:first-child {
    color: #666;
    text-align: left;
}

.detail-item span:last-child {
    font-weight: 500;
    color: #003049;
    text-align: right;
    word-break: break-word;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: right;
    border: 1px solid #bae6fd;
}

.comparison-table th {
    background-color: rgba(0, 48, 73, 0.05);
    font-weight: 600;
    text-align: center;
    color: #003049;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
}

.comparison-table tr:nth-child(even) {
    background-color: rgba(186, 230, 253, 0.1);
}

.comparison-table tr:hover {
    background-color: rgba(186, 230, 253, 0.2);
}

.comparison-table tr.selected {
    background-color: rgba(0, 48, 73, 0.1);
    font-weight: 600;
}

.comparison-table .pmi-note {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.comparison-table .no-pmi {
    color: #059669;
    font-weight: 600;
}

.comparison-table .has-pmi {
    color: #dc2626;
    font-size: 12px;
}

/* Timeline Info */
.timeline-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.timeline-info h5 {
    color: #003049;
    margin-bottom: 12px;
    font-size: 16px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #bae6fd;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item span:first-child {
    color: #666;
}

.timeline-item span:last-child {
    font-weight: 600;
    color: #003049;
}

/* Already Saved Message */
.already-saved {
    background: linear-gradient(to bottom right, #059669, #10b981);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    color: white;
    text-align: center;
}

.already-saved h4 {
    font-size: 24px;
    margin-bottom: 8px;
}

.already-saved p {
    font-size: 16px;
    opacity: 0.9;
}

/* Interest Earnings Note */
.interest-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
    font-size: 13px;
    color: #854d0e;
}

.interest-note svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .goal-summary {
        grid-template-columns: 1fr;
    }

    .goal-amount {
        font-size: 24px;
    }

    .goal-amount.highlight {
        font-size: 28px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .comparison-table {
        font-size: 13px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .input-container {
        flex-direction: column;
    }

    select.input-control {
        width: 100%;
    }

    .goal-item {
        padding: 12px 8px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 4px;
    }

    .timeline-item span:last-child {
        text-align: left;
    }
}
