/* MortgageBot - Custom Styles */

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(ellipse at top right, rgba(255, 188, 31, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(100, 112, 241, 0.08) 0%, transparent 50%),
        #f0f4ff;
    min-height: 100vh;
}

/* Number inputs - remove spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* Custom input styling */
.q-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid #c7d6fe;
    border-radius: 1rem;
    background: white;
    color: #1e1b4b;
    transition: all 0.2s;
    direction: rtl;
    text-align: right;
}

.q-input::placeholder {
    color: #a4b8fc;
    font-weight: 400;
    font-size: 1rem;
}

.q-input:focus {
    outline: none;
    border-color: #ffbc1f;
    box-shadow: 0 0 0 4px rgba(255, 188, 31, 0.15);
}

/* Choice cards */
.choice-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e0eaff;
    border-radius: 1rem;
    background: white;
    text-align: right;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e1b4b;
    transition: all 0.2s;
    cursor: pointer;
}

.choice-card:hover {
    border-color: #6470f1;
    transform: translateX(-4px);
    box-shadow: 0 8px 20px -8px rgba(100, 112, 241, 0.3);
}

.choice-card.selected {
    border-color: #ffbc1f;
    background: linear-gradient(135deg, #fff8e6 0%, #fff 100%);
    box-shadow: 0 8px 20px -8px rgba(255, 188, 31, 0.4);
}

.choice-card .check-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #c7d6fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.choice-card.selected .check-icon {
    border-color: #ffbc1f;
    background: #ffbc1f;
    color: #1e1b4b;
}

.choice-card.selected .check-icon::after {
    content: '✓';
    font-weight: 900;
    font-size: 18px;
}

.choice-card .emoji {
    font-size: 1.75rem;
    flex-shrink: 0;
}

/* Slider */
.q-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e0eaff;
    border-radius: 9999px;
    outline: none;
}

.q-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffbc1f, #e89a00);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(255, 188, 31, 0.5);
}

.q-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffbc1f, #e89a00);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(255, 188, 31, 0.5);
}

/* Breakdown rows */
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px dashed #e0eaff;
}

.breakdown-row:last-child {
    border-bottom: none;
    padding-top: 0.8rem;
    border-top: 2px solid #ffbc1f;
    font-weight: 900;
    color: #1e1b4b;
    font-size: 1.05rem;
}

.breakdown-row .label {
    color: #423fcb;
    font-weight: 600;
}

.breakdown-row .value {
    color: #1e1b4b;
    font-weight: 700;
}

/* Question label */
.q-label {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1e1b4b;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.q-help {
    font-size: 0.9rem;
    color: #6470f1;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.q-suffix {
    color: #6470f1;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* Big number animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#savings-amount {
    display: inline-block;
}

/* Loader */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 13, 46, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    color: white;
}

.loader-overlay.active { display: flex; }

.loader-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(255, 188, 31, 0.2);
    border-top-color: #ffbc1f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loader-text {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    max-width: 320px;
}

/* Validation error */
.error-msg {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: none;
}

.error-msg.show { display: block; }

.q-input.error,
.choice-card.error {
    border-color: #dc2626;
    background: #fef2f2;
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .q-label { font-size: 1.25rem; }
    .q-input { font-size: 1.1rem; padding: 0.875rem 1rem; }
    .choice-card { padding: 1rem 1.25rem; font-size: 1rem; }
}

/* Slider value display */
.slider-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: #1e1b4b;
    text-align: center;
    margin-bottom: 1rem;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6470f1;
    font-weight: 600;
    margin-top: 0.5rem;
}
