/* Mortgage Down Payment Calculator Styles */
.mdpc-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.mdpc-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.mdpc-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.mdpc-description {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mdpc-calculator {
    display: grid;
    gap: 30px;
}

.mdpc-input-section {
    background: #f9fafb;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.mdpc-input-group {
    margin-bottom: 25px;
}

.mdpc-input-group:last-child {
    margin-bottom: 0;
}

.mdpc-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.mdpc-label-text {
    font-size: 16px;
}

.mdpc-required {
    color: #ef4444;
    margin-left: 4px;
}

.mdpc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mdpc-currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 500;
    z-index: 2;
    pointer-events: none;
}

.mdpc-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 500;
    z-index: 2;
    pointer-events: none;
}

.mdpc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.mdpc-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mdpc-price-input {
    padding-left: 32px;
}

.mdpc-percent-input {
    padding-right: 32px;
}

.mdpc-amount-input {
    padding-left: 32px;
}

.mdpc-down-payment-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
}

.mdpc-input-separator {
    text-align: center;
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.mdpc-help-text {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.mdpc-minimum-display {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
}

.mdpc-minimum-text {
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
}

.mdpc-results-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 25px;
}

.mdpc-results-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    text-align: center;
}

.mdpc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.mdpc-result-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    transition: all 0.2s ease;
}

.mdpc-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mdpc-result-card.mdpc-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #1d4ed8;
}

.mdpc-result-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mdpc-primary .mdpc-result-label {
    color: rgba(255, 255, 255, 0.9);
}

.mdpc-result-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.mdpc-primary .mdpc-result-value {
    color: white;
}

.mdpc-result-note {
    font-size: 12px;
    color: #9ca3af;
}

.mdpc-primary .mdpc-result-note {
    color: rgba(255, 255, 255, 0.8);
}

.mdpc-breakdown {
    margin-top: 25px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.mdpc-breakdown-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 15px 0;
}

.mdpc-breakdown-content {
    color: #4b5563;
    line-height: 1.8;
}

.mdpc-scenarios {
    margin-top: 25px;
}

.mdpc-scenarios-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 15px 0;
}

.mdpc-scenarios-grid {
    display: grid;
    gap: 12px;
}

.mdpc-scenario-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 6px;
    align-items: center;
    font-size: 14px;
}

.mdpc-scenario-header {
    font-weight: 600;
    background: #e5e7eb;
}

.mdpc-info-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
}

.mdpc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.mdpc-info-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.mdpc-info-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.mdpc-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mdpc-info-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
    font-size: 14px;
}

.mdpc-info-list li:last-child {
    border-bottom: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mdpc-container {
        padding: 15px;
        margin: 10px;
    }
    
    .mdpc-title {
        font-size: 24px;
    }
    
    .mdpc-description {
        font-size: 14px;
    }
    
    .mdpc-down-payment-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .mdpc-input-separator {
        display: none;
    }
    
    .mdpc-results-grid {
        grid-template-columns: 1fr;
    }
    
    .mdpc-info-grid {
        grid-template-columns: 1fr;
    }
    
    .mdpc-scenario-row {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mdpc-container {
        padding: 12px;
    }
    
    .mdpc-input-section, .mdpc-results-section, .mdpc-breakdown, .mdpc-info-section {
        padding: 18px;
    }
    
    .mdpc-title {
        font-size: 20px;
    }
    
    .mdpc-input {
        font-size: 16px;
        padding: 10px 14px;
    }
    
    .mdpc-result-value {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .mdpc-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .mdpc-input-section {
        display: none;
    }
    
    .mdpc-scenarios {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mdpc-container {
        border: 2px solid #000;
    }
    
    .mdpc-input {
        border: 2px solid #000;
    }
    
    .mdpc-result-card {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .mdpc-input, .mdpc-result-card {
        transition: none;
    }
}