/* Mortgage Calculator Block Styles */

.revhyper-mortgage-calculator {
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--gray-50, #fafafa);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--gray-200, #e5e5e5);
    position: relative;
}

.revhyper-mortgage-calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #0066cc) 0%, var(--secondary-color, #00a8cc) 100%);
    border-radius: var(--radius-md, 8px) var(--radius-md, 8px) 0 0;
}

.mortgage-calc-header {
    margin-bottom: 2rem;
    text-align: center;
}

.mortgage-calc-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.mortgage-calc-description {
    font-size: 1rem;
    color: var(--gray-600, #4b5563);
    margin: 0;
    line-height: 1.6;
}

.mortgage-calc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mortgage-calc-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700, #374151);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-field .required {
    color: #dc2626;
}

.calc-field .help-text {
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--gray-500, #6b7280);
    font-style: italic;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix,
.input-suffix {
    position: absolute;
    color: var(--gray-600, #4b5563);
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
}

.input-prefix {
    left: 0.75rem;
}

.input-suffix {
    right: 0.75rem;
}

.calc-input {
    width: 100%;
    padding: 0.75rem;
    padding-left: 2.25rem;
    padding-right: 2.5rem;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: var(--radius-md, 6px);
    font-size: 1rem;
    font-family: inherit;
    background-color: white;
    color: var(--gray-900, #111827);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-input:focus {
    outline: none;
    border-color: var(--primary-color, #0066cc);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.calc-input[type="text"] {
    text-align: right;
}

.calc-input[type="text"]:not(.down-payment-percent-input):not(.interest-rate-input) {
    padding-left: 2.5rem;
    padding-right: 0.75rem;
}

.calc-input.select,
.calc-input[type="select"],
select.calc-input {
    padding: 0.75rem;
    padding-right: 2.5rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b5563' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 0.75rem;
}

.mortgage-calc-result {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--gray-200, #e5e5e5);
}

.result-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100, #f3f4f6);
}

.payment-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.result-total {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color, #0066cc);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.breakdown-label {
    font-size: 0.9375rem;
    color: var(--gray-600, #4b5563);
}

.breakdown-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
}

.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.breakdown-label {
    font-size: 0.9375rem;
    color: var(--gray-600, #4b5563);
}

.breakdown-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
}

.result-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.summary-item.highlight {
    padding: 1rem;
    background-color: var(--gray-50, #fafafa);
    border-radius: var(--radius-md, 6px);
    border-left: 3px solid var(--primary-color, #0066cc);
}

.summary-label {
    font-size: 0.9375rem;
    color: var(--gray-600, #4b5563);
}

.summary-item.highlight .summary-label {
    font-weight: 600;
    color: var(--gray-700, #374151);
}

.summary-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
}

.summary-item.highlight .summary-value {
    font-size: 1.25rem;
    color: var(--primary-color, #0066cc);
}

.result-cta {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.cta-button {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    font-family: inherit;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cta-button:hover {
    background: linear-gradient(135deg, #20ba5a 0%, #25d366 100%);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transform: translateY(-2px);
    color: white;
}

.cta-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mortgage-calc-wrapper {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .revhyper-mortgage-calculator {
        padding: 1.25rem 1rem;
        margin: 1.25rem 0;
    }
    
    .mortgage-calc-header {
        margin-bottom: 1.25rem;
    }
    
    .mortgage-calc-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .mortgage-calc-description {
        font-size: 0.875rem;
    }
    
    .mortgage-calc-wrapper {
        gap: 1.25rem;
    }
    
    .mortgage-calc-result {
        padding: 1.5rem;
    }
    
    .result-header {
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .result-label {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .result-total {
        font-size: 1.875rem;
    }
    
    .payment-breakdown {
        gap: 0.875rem;
    }
    
    .breakdown-label {
        font-size: 0.875rem;
    }
    
    .breakdown-value {
        font-size: 1rem;
    }
    
    .mortgage-calc-form {
        gap: 1rem;
    }
    
    .calc-field {
        gap: 0.375rem;
    }
    
    .calc-field label {
        font-size: 0.8125rem;
    }
    
    .calc-input {
        padding: 0.625rem;
        padding-left: 2rem;
        padding-right: 2.25rem;
        font-size: 0.9375rem;
    }
    
    .input-group {
        grid-template-columns: 1fr;
    }
    
    .result-cta {
        padding-top: 1.25rem;
        margin-top: 1.25rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

