.uk-mortgage-calculator {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.calculator-container {
    position: relative;
    min-height: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.calculator-form,
.calculator-summary {
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator-form.slide-out {
    transform: translateX(-100%);
    opacity: 0;
    position: absolute;
    width: 100%;
}

.calculator-summary {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateX(100%);
    opacity: 0;
}

.calculator-summary.slide-in {
    transform: translateX(0);
    opacity: 1;
    position: relative;
}

.hidden {
    display: none;
}

/* Typography */
.calculator-title {
    margin: 0 0 32px 0;
    font-size: 28px;
    font-weight: 600;
    color: #000000;
}

.summary-title {
    margin: 0 0 24px 0;
    font-size: 26px;
    font-weight: 600;
    color: #000000;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    color: #000000;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #087c87;
    box-shadow: 0 0 0 3px rgba(8, 124, 135, 0.1);
}

.form-control:hover {
    border-color: #087c87;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .form-control {
    padding-left: 36px;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 500;
    color: #666;
    pointer-events: none;
}

.error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #dc2626;
    min-height: 18px;
}

/* Buttons */
.btn-calculate {
    width: 100% !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: #087c87 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 16px !important;
}

.btn-calculate:hover {
    background: #076a73 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(8, 124, 135, 0.3) !important;
}

.btn-calculate:active {
    transform: translateY(0) !important;
}

.btn-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #087c87 !important;
    background: transparent !important;
    border: 2px solid #087c87 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;;
    margin-bottom: 24px !important;
}

.btn-back:hover {
    background: #087c87;
    color: #ffffff;
}

/* Summary Cards */
.highlight-card {
    background: linear-gradient(135deg, #087c87 0%, #0a969f 100%);
    color: #ffffff;
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.summary-card {
    padding: 24px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.summary-card:hover {
    border-color: #087c87;
    box-shadow: 0 4px 12px rgba(8, 124, 135, 0.1);
}

.summary-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.9;
}

.highlight-card .summary-label {
    color: rgb(8 124 135);
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
}

.highlight-card .summary-value {
    color: rgb(8 124 135);
}

.summary-value.large {
    font-size: 36px;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

/* Breakdown */
.summary-breakdown {
    padding: 24px;
    background: #f9fafb;
    border-radius: 8px;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.breakdown-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-size: 14px;
    color: #000000;
}

.breakdown-value {
    font-size: 16px;
    font-weight: 600;
    color: #087c87;
}

/* Responsive */
@media (max-width: 640px) {
    .calculator-form,
    .calculator-summary {
        padding: 24px;
    }
    
    .calculator-title {
        font-size: 24px;
    }
    
    .summary-title {
        font-size: 22px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-value.large {
        font-size: 28px;
    }
}

/* Input number arrows removal for Chrome */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Input number arrows removal for Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* Loading state */
.btn-calculate.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-calculate.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}
