/*
 * We Fit Any Kitchen — Frontend Styles
 */

/* ─── Bootstrap Overrides ────────────────────────────────── */
:root {
    --bs-primary: #29ac49;
    --bs-primary-rgb: 41, 172, 73;
    --bs-link-color: #29ac49;
    --bs-link-hover-color: #218c3b;
}

.btn-primary {
    --bs-btn-bg: #29ac49;
    --bs-btn-border-color: #29ac49;
    --bs-btn-hover-bg: #218c3b;
    --bs-btn-hover-border-color: #218c3b;
    --bs-btn-active-bg: #1d7a34;
    --bs-btn-active-border-color: #1d7a34;
}

.btn-outline-primary {
    --bs-btn-color: #29ac49;
    --bs-btn-border-color: #29ac49;
    --bs-btn-hover-bg: #29ac49;
    --bs-btn-hover-border-color: #29ac49;
    --bs-btn-active-bg: #218c3b;
    --bs-btn-active-border-color: #218c3b;
}

.text-primary {
    color: #29ac49 !important;
}

.bg-primary {
    background-color: #29ac49 !important;
}

.progress-bar {
    background-color: #29ac49;
}

.border-primary {
    border-color: #29ac49 !important;
}

/* ─── General ────────────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.min-vh-75 {
    min-height: 75vh;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero-section {
    padding: 4rem 0 3rem;
}

.hero-illustration {
    padding: 2rem;
}

.quote-card-mock {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    padding: 0;
    text-align: left;
    max-width: 340px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    transform: rotate(-1deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-card-mock:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 24px 70px rgba(0,0,0,0.16), 0 6px 16px rgba(0,0,0,0.08);
}

.mock-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: #29ac49;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.9rem;
    border-radius: 0 16px 0 10px;
}

.mock-header {
    font-weight: 700;
    font-size: 1rem;
    padding: 1.4rem 1.5rem 0.8rem;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.mock-header i {
    color: #29ac49;
    margin-right: 0.3rem;
}

.mock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid #f5f5f5;
}

.mock-label {
    font-size: 0.9rem;
    color: #666;
}

.mock-value {
    font-size: 1.05rem;
    font-weight: 700;
}

.mock-row-their .mock-value {
    color: #dc3545;
}

.mock-row-their .mock-value s {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

.mock-row-ours {
    background: #f0faf2;
}

.mock-row-ours .mock-value {
    color: #29ac49;
    font-size: 1.15rem;
}

.mock-saving-box {
    background: linear-gradient(135deg, #29ac49, #1d8a3a);
    color: #fff;
    text-align: center;
    padding: 1.2rem 1.5rem;
}

.mock-saving-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.mock-saving-amount {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0.2rem 0;
}

.mock-saving-pct {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.mock-footer {
    padding: 0.7rem 1.5rem;
    font-size: 0.72rem;
    color: #999;
    text-align: center;
    background: #fafafa;
}

.mock-footer i {
    color: #29ac49;
    margin-right: 0.2rem;
}

/* ─── Step Icons ─────────────────────────────────────────── */
.step-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #e8f5ec;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.8rem;
    color: #29ac49;
}

/* ─── Upload Zone ────────────────────────────────────────── */
.upload-zone {
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #29ac49;
    background: #eef8f0;
}

.upload-zone.dragover {
    transform: scale(1.02);
}

/* ─── Scan Animation ─────────────────────────────────────── */
.scan-animation {
    position: relative;
    display: inline-block;
}

.scan-icon {
    position: relative;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #29ac49, transparent);
    animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
    0%   { top: 10%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 90%; opacity: 0; }
}

/* ─── Step Panels ────────────────────────────────────────── */
.step-panel {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    animation: fadeIn 0.4s ease;
}

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

/* ─── Button Option Groups ───────────────────────────────── */
.btn-group-custom {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    user-select: none;
}

.btn-option:hover {
    border-color: #29ac49;
    background: #eef8f0;
}

.btn-option input[type="radio"] {
    display: none;
}

.btn-option:has(input:checked) {
    border-color: #29ac49;
    background: #29ac49;
    color: #fff;
}

/* ─── Saving Teaser ──────────────────────────────────────── */
.saving-teaser {
    padding: 2rem;
}

.blurred-saving {
    filter: blur(8px);
    opacity: 0.6;
    user-select: none;
    margin: 1rem 0;
}

/* ─── Result Page ────────────────────────────────────────── */
.result-saving {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.result-saving .saving-number {
    font-size: 3.5rem;
    font-weight: bold;
    color: #155724;
}

.result-cant-beat {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.comparison-table {
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th {
    background: #f8f9fa;
}

.anchoring-note {
    background: #e8f5ec;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
}

/* ─── Animated Counter ───────────────────────────────────── */
.counter-animate {
    display: inline-block;
    transition: all 0.1s ease;
}

/* ─── Loading state for buttons ──────────────────────────── */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

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

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .step-panel {
        padding: 1.5rem;
    }

    .result-saving .saving-number {
        font-size: 2.5rem;
    }
}
