/**
 * Berezivka Calculator — Frontend CSS
 *
 * Design system:
 *   - Colors: Gold palette (#B9862F, #D6A245), Dark (#1B1B1A), Cream (#F7F5F1)
 *   - Fonts: Manrope (headings), Inter (body), IBM Plex Mono (numbers)
 *   - Mobile-first: base = single column; @media ≥768px = two columns
 *
 * Z-index layers:
 *   - Floating button: 99999
 *   - Popup overlay:   100000
 *   - Popup content:   100001
 *
 * @package Berezivka_Calculator
 */

/* ============================================================
 * CSS Custom Properties
 * ============================================================ */

:root {
    --bc-gold:        #B9862F;
    --bc-gold-light:  #D6A245;
    --bc-gold-muted:  #C9B686;
    --bc-dark:        #1B1B1A;
    --bc-cream:       #F7F5F1;
    --bc-border:      #E2DCCB;
    --bc-bg-card:     #EFEBE2;
    --bc-text:        #1B1B1A;
    --bc-text-muted:  #736E5E;
    --bc-text-light:  #948C74;
    --bc-success:     #46b450;
    --bc-error:       #dc3232;
    --bc-radius:      14px;
    --bc-radius-sm:   10px;
    --bc-radius-lg:   16px;
    --bc-transition:  0.25s ease;
    --bc-font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --bc-font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --bc-font-mono:   'IBM Plex Mono', 'SF Mono', monospace;
}

/* ============================================================
 * Floating button (CTA) — Always aligned to the LEFT
 * ============================================================ */

.bc-floating-btn {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    right: auto !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 22px !important;
    background: var(--bc-dark) !important;
    color: var(--bc-cream) !important;
    border: none !important;
    border-radius: 60px !important;
    cursor: pointer !important;
    font-family: var(--bc-font-heading) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 8px 32px rgba(27, 27, 26, 0.35) !important;
    transition: transform var(--bc-transition), box-shadow var(--bc-transition), background var(--bc-transition) !important;
    -webkit-tap-highlight-color: transparent !important;
}

.bc-floating-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 40px rgba(27, 27, 26, 0.45) !important;
    background: #282827 !important;
}

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

.bc-floating-btn i.kitchor-icon-calculator1,
.bc-floating-btn i[class*="kitchor-icon-"],
.bc-floating-btn i.fa,
.bc-floating-btn i.fas {
    font-size: 18px !important;
    color: var(--bc-gold) !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Mobile: left-aligned floating button */
@media (max-width: 767px) {
    .bc-floating-btn {
        bottom: 20px !important;
        left: 16px !important;
        right: auto !important;
        border-radius: 50px !important;
        padding: 12px 18px !important;
        font-size: 13px !important;
    }
}

/* ============================================================
 * Popup overlay
 * ============================================================ */

.bc-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    background: rgba(27, 27, 26, 0.65) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.bc-overlay.bc-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================================
 * Popup container (Expanded width 1040px)
 * ============================================================ */

.bc-popup {
    position: relative !important;
    z-index: 100001 !important;
    width: 100% !important;
    max-width: 1040px !important;
    max-height: 92vh !important;
    background: var(--bc-cream) !important;
    border-radius: 20px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    box-shadow: 0 24px 80px rgba(27, 27, 26, 0.35) !important;
    transform: translateY(20px) scale(0.98) !important;
    transition: transform 0.35s cubic-bezier(.2, .9, .3, 1.1) !important;
    box-sizing: border-box !important;
}

.bc-overlay.bc-visible .bc-popup {
    transform: translateY(0) scale(1) !important;
}

/* Close button — Positioned at top-right corner */
.bc-popup-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 100 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bc-dark) !important;
    color: var(--bc-cream) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 20px !important;
    line-height: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.bc-popup-close:hover {
    background: var(--bc-gold) !important;
    color: #FFFFFF !important;
    transform: scale(1.08) !important;
}

/* Popup inner padding */
.bc-popup-content {
    padding: 24px 28px !important;
    box-sizing: border-box !important;
}

/* Mobile: full-height popup */
@media (max-width: 767px) {
    .bc-overlay {
        padding: 0 !important;
    }

    .bc-popup {
        max-width: 100vw !important;
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
    }

    .bc-popup-close {
        top: 12px !important;
        right: 12px !important;
    }

    .bc-popup-content {
        padding: 16px 14px 80px !important;
    }
}

/* ============================================================
 * Carousel (Full width with image, title, complex, price, details button, arrows)
 * ============================================================ */

.bc-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 22px;
}

.bc-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #D8CFB8 transparent;
}

.bc-carousel::-webkit-scrollbar {
    height: 5px;
}

.bc-carousel::-webkit-scrollbar-thumb {
    background: #D8CFB8;
    border-radius: 999px;
}

/* Arrow buttons */
.bc-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bc-dark);
    color: var(--bc-cream);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
    opacity: 0.85;
}

.bc-carousel-arrow:hover {
    opacity: 1;
    background: var(--bc-gold);
    transform: translateY(-50%) scale(1.08);
}

.bc-arrow-left {
    left: -10px;
}

.bc-arrow-right {
    right: -10px;
}

@media (max-width: 767px) {
    .bc-carousel-arrow {
        display: none; /* Swipe on mobile */
    }
}

/* Cottage Card in Carousel */
.bc-cottage-card {
    flex: 0 0 160px;
    width: 160px;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1.5px solid var(--bc-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-sizing: border-box;
}

.bc-cottage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(27, 27, 26, 0.08);
    border-color: var(--bc-gold-muted);
}

.bc-cottage-card.bc-active {
    border-color: var(--bc-gold) !important;
    background: #FAF7F0 !important;
    box-shadow: 0 4px 14px rgba(185, 134, 47, 0.22);
}

.bc-cottage-thumb {
    width: 100%;
    height: 90px;
    object-fit: cover;
    background: var(--bc-bg-card);
    display: block;
}

.bc-cottage-thumb-placeholder {
    width: 100%;
    height: 90px;
    background: var(--bc-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bc-text-light);
    font-size: 24px;
}

.bc-cottage-body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 4px;
}

.bc-cottage-title {
    font-family: var(--bc-font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--bc-dark);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-cottage-complex {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bc-gold);
    line-height: 1.1;
}

.bc-cottage-price {
    font-family: var(--bc-font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--bc-text-muted);
    font-variant-numeric: tabular-nums;
}

.bc-cottage-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--bc-font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--bc-text-muted);
    text-decoration: none;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--bc-bg-card);
    margin-top: 4px;
    width: fit-content;
    transition: all 0.2s ease;
}

.bc-cottage-link:hover {
    background: var(--bc-dark);
    color: #FFFFFF;
}

/* ============================================================
 * Two-column layout (desktop ≥768px)
 * ============================================================ */

.bc-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

@media (min-width: 768px) {
    .bc-layout {
        flex-direction: row;
        gap: 30px;
    }

    .bc-col-left {
        flex: 1.05;
        min-width: 0;
    }

    .bc-col-right {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

/* ============================================================
 * Price card (with "Вартість котеджу" and discount note)
 * ============================================================ */

.bc-price-card {
    background: var(--bc-bg-card);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: bcPopPrice 0.3s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes bcPopPrice {
    0% { opacity: 0; transform: translateY(4px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.bc-price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}

.bc-price-label {
    font-family: var(--bc-font-heading);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bc-text-muted);
}

.bc-discount-note {
    font-size: 11px;
    font-weight: 600;
    color: var(--bc-gold);
    background: rgba(185, 134, 47, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
}

.bc-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.bc-price-value {
    font-family: var(--bc-font-mono);
    font-size: 28px;
    font-weight: 600;
    color: var(--bc-dark);
    font-variant-numeric: tabular-nums;
}

.bc-price-old {
    font-family: var(--bc-font-mono);
    font-size: 16px;
    color: var(--bc-text-light);
    text-decoration: line-through;
}

.bc-discount-badge {
    font-family: var(--bc-font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--bc-gold);
    background: rgba(185, 134, 47, 0.14);
    padding: 2px 8px;
    border-radius: 6px;
}

/* ============================================================
 * Down payment slider (with presets)
 * ============================================================ */

.bc-slider-section {
    margin-bottom: 22px;
}

.bc-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bc-slider-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bc-gold);
    color: #FFFFFF;
    border-radius: var(--bc-radius-sm);
    padding: 7px 14px;
    box-shadow: 0 2px 8px rgba(185, 134, 47, 0.25);
}

.bc-slider-badge-label {
    font-size: 11.5px;
    opacity: 0.9;
    font-weight: 500;
}

.bc-slider-badge-value {
    font-family: var(--bc-font-mono);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bc-slider-pct {
    font-family: var(--bc-font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--bc-gold);
    font-variant-numeric: tabular-nums;
}

/* Range input */
input[type="range"].bc-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--bc-gold) 0%,
        var(--bc-gold) var(--bc-fill, 0%),
        var(--bc-border) var(--bc-fill, 0%),
        var(--bc-border) 100%
    );
    outline: none;
    cursor: pointer;
    touch-action: none;
}

input[type="range"].bc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bc-cream);
    border: 3px solid var(--bc-gold);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(27, 27, 26, 0.3);
    transition: transform 0.1s ease;
}

input[type="range"].bc-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"].bc-range::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bc-cream);
    border: 3px solid var(--bc-gold);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(27, 27, 26, 0.3);
}

/* Slider preset chips */
.bc-slider-presets {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.bc-preset-btn {
    flex: 1;
    padding: 6px 0;
    border: 1px solid var(--bc-border);
    background: #FFFFFF;
    border-radius: 6px;
    font-family: var(--bc-font-mono);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--bc-text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.bc-preset-btn:hover {
    background: var(--bc-bg-card);
    color: var(--bc-dark);
}

.bc-preset-btn.bc-active {
    background: var(--bc-gold) !important;
    color: #FFFFFF !important;
    border-color: var(--bc-gold) !important;
}

/* ============================================================
 * Term picker (segmented buttons)
 * ============================================================ */

.bc-term-picker {
    display: flex;
    gap: 4px;
    background: var(--bc-bg-card);
    border-radius: var(--bc-radius);
    padding: 4px;
    border: 1px solid var(--bc-border);
    margin-bottom: 22px;
}

.bc-term-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: transparent;
    border-radius: var(--bc-radius-sm);
    padding: 8px 4px;
    cursor: pointer;
    font-family: var(--bc-font-heading);
    color: var(--bc-text-muted);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bc-term-btn .bc-term-num {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.bc-term-btn .bc-term-grace {
    font-size: 9.5px;
    font-weight: 500;
    opacity: 0.75;
    line-height: 1.1;
}

.bc-term-btn:hover:not(.bc-active) {
    background: rgba(255, 255, 255, 0.5);
    color: var(--bc-text);
}

.bc-term-btn.bc-active {
    background: var(--bc-dark) !important;
    color: var(--bc-cream) !important;
    box-shadow: 0 2px 8px rgba(27, 27, 26, 0.18);
}

.bc-term-btn.bc-active .bc-term-grace {
    opacity: 0.9;
    color: var(--bc-gold-light);
}

/* ============================================================
 * Monthly payment result card
 * ============================================================ */

.bc-result-card {
    background: var(--bc-dark);
    color: var(--bc-cream);
    border-radius: var(--bc-radius-lg);
    padding: 20px;
    box-shadow: 0 4px 16px rgba(27, 27, 26, 0.15);
}

.bc-result-label {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 4px;
}

.bc-result-amount {
    font-family: var(--bc-font-mono);
    font-size: 34px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    animation: bcPopPrice 0.3s cubic-bezier(.2, .9, .3, 1.2);
}

/* ============================================================
 * Tabs (Summary / Schedule)
 * ============================================================ */

.bc-tabs {
    display: flex;
    gap: 4px;
    background: var(--bc-bg-card);
    border-radius: var(--bc-radius-sm);
    padding: 4px;
    border: 1px solid var(--bc-border);
    margin-top: 14px;
}

.bc-tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--bc-font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--bc-text-muted);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bc-tab-btn.bc-active {
    background: var(--bc-dark);
    color: var(--bc-cream);
    box-shadow: 0 2px 6px rgba(27, 27, 26, 0.15);
}

.bc-tab-content {
    display: none;
    margin-top: 14px;
}

.bc-tab-content.bc-active {
    display: block;
}

/* ============================================================
 * Summary stats
 * ============================================================ */

.bc-summary-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bc-stat-item {
    flex: 1;
    min-width: 120px;
}

.bc-stat-label {
    font-size: 11px;
    color: var(--bc-text-light);
    margin-bottom: 2px;
}

.bc-stat-value {
    font-family: var(--bc-font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--bc-text);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
 * Schedule table
 * ============================================================ */

.bc-schedule-wrap {
    border: 1px solid var(--bc-border);
    border-radius: 12px;
    overflow: hidden;
    background: #FFFFFF;
}

.bc-schedule-scroll {
    max-height: 280px;
    overflow-y: auto;
}

.bc-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--bc-font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.bc-schedule-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.bc-schedule-table th {
    background: var(--bc-bg-card);
    padding: 8px 10px;
    text-align: right;
    font-weight: 600;
    color: var(--bc-text);
}

.bc-schedule-table th:first-child {
    text-align: left;
}

.bc-schedule-table td {
    padding: 6px 10px;
    text-align: right;
    border-top: 1px solid var(--bc-bg-card);
}

.bc-schedule-table td:first-child {
    text-align: left;
}

.bc-schedule-table .bc-interest-zero {
    color: var(--bc-text-light);
}

/* ============================================================
 * Bar chart
 * ============================================================ */

.bc-chart-container {
    background: var(--bc-bg-card);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-lg);
    padding: 16px 16px 14px;
    margin-bottom: 14px;
}

.bc-chart-title {
    font-size: 12px;
    color: var(--bc-text-muted);
    margin-bottom: 12px;
}

.bc-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 64px;
}

.bc-chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 64px;
}

.bc-chart-bar-interest {
    background: var(--bc-gold-light);
    border-radius: 2px 2px 0 0;
}

.bc-chart-bar-principal {
    background: var(--bc-gold);
}

.bc-chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--bc-text-muted);
}

.bc-legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: middle;
}

/* ============================================================
 * Note / disclaimer
 * ============================================================ */

.bc-note {
    font-size: 11.5px;
    color: var(--bc-text-light);
    line-height: 1.5;
    margin-top: 14px;
}

/* ============================================================
 * Action buttons
 * ============================================================ */

.bc-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.bc-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--bc-radius-sm);
    cursor: pointer;
    font-family: var(--bc-font-heading);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bc-btn i {
    font-size: 15px;
    line-height: 1;
}

.bc-btn-primary {
    background: var(--bc-gold);
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(185, 134, 47, 0.3);
}

.bc-btn-primary:hover {
    background: #9E6F22;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(185, 134, 47, 0.4);
}

.bc-btn-secondary {
    background: var(--bc-bg-card);
    color: var(--bc-text);
    border: 1px solid var(--bc-border);
}

.bc-btn-secondary:hover {
    background: var(--bc-border);
    transform: translateY(-1px);
}

.bc-btn:active {
    transform: translateY(0);
}

.bc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 767px) {
    .bc-actions {
        flex-direction: column;
    }
}

/* ============================================================
 * Contact form (step 2) — Centered Compact Container
 * ============================================================ */

.bc-form-container {
    max-width: 580px;
    margin: 0 auto;
}

.bc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bc-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bc-form-label {
    font-family: var(--bc-font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--bc-text);
}

.bc-form-label .bc-required {
    color: var(--bc-error);
    margin-left: 2px;
}

.bc-form-input {
    padding: 12px 14px;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    font-family: var(--bc-font-body);
    font-size: 14px;
    background: #FFFFFF;
    color: var(--bc-text);
    outline: none;
    transition: border-color var(--bc-transition), box-shadow var(--bc-transition);
}

.bc-form-input:focus {
    border-color: var(--bc-gold);
    box-shadow: 0 0 0 3px rgba(185, 134, 47, 0.15);
}

.bc-form-input.bc-invalid {
    border-color: var(--bc-error);
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.bc-form-error {
    font-size: 12px;
    color: var(--bc-error);
    display: none;
}

.bc-form-error.bc-visible {
    display: block;
}

textarea.bc-form-input {
    resize: vertical;
    min-height: 80px;
}

.bc-form-context {
    background: var(--bc-bg-card);
    border-radius: var(--bc-radius-sm);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--bc-text-muted);
    line-height: 1.5;
    border: 1px solid var(--bc-border);
    margin-bottom: 18px;
}

/* ============================================================
 * Success step (step 3)
 * ============================================================ */

.bc-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 20px;
    gap: 16px;
}

.bc-success-icon {
    width: 60px;
    height: 60px;
    background: var(--bc-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #FFFFFF;
}

.bc-success-title {
    font-family: var(--bc-font-heading);
    font-size: 22px;
    font-weight: 700;
}

.bc-success-text {
    font-size: 14px;
    color: var(--bc-text-muted);
    max-width: 420px;
}

/* ============================================================
 * Loading spinner
 * ============================================================ */

.bc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: bcSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* ============================================================
 * Utilities
 * ============================================================ */

.bc-mono {
    font-family: var(--bc-font-mono);
    font-variant-numeric: tabular-nums;
}

.bc-hidden {
    display: none !important;
}
