/**
 * Budget & Special Request Screen
 * Matches Figma node 103:4895 — "7_Personalized Card"
 */

/* ── Sub-header: "Wir sind gleich da..." ── */
.budget-subheader {
    display: flex;
    align-items: center;
    gap: var(--spacing-base);
    padding: var(--spacing-base) 0;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: var(--spacing-base);
    width: 100%;
}

.budget-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--white);
    border: 2px solid var(--light-gray);
    flex-shrink: 0;
    text-decoration: none;
    transition: all 0.2s ease;
    color: var(--dark);
}

.budget-back-btn:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.budget-back-btn img {
    width: 20px;
    height: 20px;
}

.budget-subheader-text {
    flex: 1;
    text-align: center;
    /* offset the back button so text feels truly centred */
    margin-right: 36px;
}

.budget-subheader-text h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.32px;
    line-height: 21px;
    margin: 0;
}

.budget-subheader-text p {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--gray);
    letter-spacing: -0.32px;
    line-height: 21px;
    margin: 0;
}

/* ── Progress bar — 4 steps ── */
.budget-progress-bar {
    margin-bottom: var(--spacing-lg);
}

/* ── Image cards (budget + special request) ──
   Same sizing as a feature card: full width on mobile (within 2-col grid),
   capped at feature-card width on desktop */
.budget-card {
    width: 100%;
    height: 240px;    /* matches .selection-card.feature-card base height */
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow:
        0px 8px 16px 0px rgba(28, 25, 23, 0.02),
        0px 4px 8px 0px rgba(28, 25, 23, 0.03);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.budget-card-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 6px;
    padding: 8px 12px;
    max-width: 60%;
}

.budget-card-overlay span {
    font-size: 1rem;       /* matches .feature-card .card-title */
    font-weight: 600;
    color: #090814;
    letter-spacing: -0.06px;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ── Range slider section ── */
.budget-slider-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.budget-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.budget-slider-label span:first-child {
    font-size: 0.875rem;
    font-weight: 600;
    color: #020617;
    letter-spacing: 0.07px;
}

.budget-slider-label span:last-child {
    font-size: 0.875rem;
    font-weight: 400;
    color: #64748b;
    letter-spacing: 0.07px;
}

/* Dual-range slider track */
.budget-range-wrapper {
    position: relative;
    height: 16px;
    display: flex;
    align-items: center;
}

.budget-range-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    background: #cbd5e1;
    border-radius: 10px;
    pointer-events: none;
}

.budget-range-fill {
    position: absolute;
    height: 100%;
    background: var(--primary-blue);
    border-radius: 10px;
}

/* Both range inputs overlap the same track */
.budget-range-input {
    position: absolute;
    width: 100%;
    height: 5px;
    background: transparent;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    margin: 0;
    padding: 0;
}

.budget-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: all;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: #ffffff;
    border: 2px solid var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(62, 142, 244, 0.35), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.budget-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(62, 142, 244, 0.5), 0 1px 4px rgba(0, 0, 0, 0.12);
}

.budget-range-input::-moz-range-thumb {
    pointer-events: all;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: #ffffff;
    border: 2px solid var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(62, 142, 244, 0.35), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ── Textarea wrapper ── */
.budget-textarea-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.budget-textarea-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #020617;
    letter-spacing: 0.07px;
}

/* ── Textarea ── */
.budget-textarea {
    width: 100%;
    min-height: 76px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--dark);
    background: var(--white);
    resize: none;
    overflow: hidden;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
    outline: none;
    transition: border-color 0.2s ease;
    line-height: 21px;
    letter-spacing: 0.07px;
    box-sizing: border-box;
}

.budget-textarea::placeholder {
    color: #64748b;
}

.budget-textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(62, 142, 244, 0.15);
}

/* ── Character counter ── */
.budget-char-counter {
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    letter-spacing: 0.07px;
    transition: color 0.2s ease;
}

.budget-char-counter.near-limit {
    color: #f97316;
}

.budget-char-counter.at-limit {
    color: #ef4444;
}


/* ── Responsive ── */
@media (max-width: 768px) {
    .budget-subheader-text h2 {
        font-size: 1rem;
    }

    .budget-subheader-text p {
        font-size: 0.8125rem;
    }

    .budget-subheader {
        padding: 6px 0;
        margin-bottom: 6px;
    }

    .budget-progress-bar {
        margin-bottom: 6px;
    }

    .budget-card {
        height: 150px;
    }

    .budget-slider-section {
        margin-bottom: 16px;
    }
}

@media (min-width: 1024px) {
    /* Cap card + controls to feature-card proportions (≈1/3 of 1400px grid) */
    .budget-card,
    .budget-slider-section,
    .budget-textarea-wrapper {
        max-width: 460px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Match desktop feature card height */
    .budget-card {
        height: 220px;
    }
}
