/* ====================================
   WQC Frontend v2 – Premium Dark Theme
   with Scenario Selection
   ==================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

#wqc-calculator-wrapper {
    max-width: 860px;
    margin: 2rem auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: rgba(20, 20, 28, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 44px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6);
    color: #f3f4f6;
}

/* ── Scenario Selection ── */
.wqc-scenario-step {
    display: none;
}
.wqc-scenario-step.active {
    display: block;
    animation: fadeUp 0.5s ease forwards;
}

.wqc-scenario-step h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-align: center;
}

.wqc-scenario-subtitle {
    text-align: center;
    color: #9ca3af;
    font-size: 1rem;
    margin-bottom: 36px;
}

.wqc-scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.wqc-scenario-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.wqc-scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wqc-scenario-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-color);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--card-color);
}

.wqc-scenario-card:hover::before {
    opacity: 1;
}

.wqc-scenario-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.4rem;
    color: var(--card-color);
    transition: all 0.3s ease;
}

.wqc-scenario-card:hover .wqc-scenario-card__icon {
    background: var(--card-color);
    color: #fff;
    transform: scale(1.05);
}

.wqc-scenario-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px 0;
}

.wqc-scenario-card__desc {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.5;
}

.wqc-scenario-card__arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: rgba(255,255,255,0.15);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.wqc-scenario-card:hover .wqc-scenario-card__arrow {
    color: var(--card-color);
    transform: translateX(4px);
}

/* ── Steps ── */
.wqc-step-counter {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #6b7280;
    margin-bottom: 10px;
}

.wqc-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 32px;
    overflow: hidden;
}

.wqc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #eab308, #f59e0b);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.4);
}

.wqc-step {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.wqc-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeUp 0.5s ease forwards;
}

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

.wqc-step h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 28px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
}

/* ── Form Fields ── */
.wqc-field-group {
    margin-bottom: 22px;
}

.wqc-field-group > label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #e5e7eb;
}

.wqc-field-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: -5px;
    margin-bottom: 10px;
}

.wqc-field-group input[type="text"],
.wqc-field-group input[type="email"],
.wqc-field-group input[type="url"],
.wqc-field-group input[type="number"],
.wqc-field-group textarea,
.wqc-field-group select {
    width: 100%;
    padding: 13px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 15px;
    color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.wqc-field-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.wqc-field-group select option {
    background: #1f2937;
    color: #fff;
}

.wqc-field-group input::placeholder,
.wqc-field-group textarea::placeholder {
    color: #4b5563;
}

.wqc-field-group input:focus,
.wqc-field-group textarea:focus,
.wqc-field-group select:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: #eab308;
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.12);
}

/* ── Radio & Checkbox ── */
.wqc-radio-group,
.wqc-checkbox-group {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
}

.wqc-radio-group label,
.wqc-checkbox-group label {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 13px 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    font-size: 0.95rem !important;
    transition: all 0.25s ease !important;
    margin: 0 !important;
}

.wqc-radio-group label:hover,
.wqc-checkbox-group label:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Highlight selected option */
.wqc-radio-group label:has(input:checked),
.wqc-checkbox-group label:has(input:checked) {
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.35);
    box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.15);
}

.wqc-radio-group input[type="radio"],
.wqc-checkbox-group input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #eab308;
    cursor: pointer;
    flex-shrink: 0;
}

/* Price tags next to options */
.wqc-price-tag {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: #eab308;
    background: rgba(234, 179, 8, 0.1);
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Navigation ── */
.wqc-nav {
    margin-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 22px;
}

.wqc-btn {
    padding: 13px 26px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.wqc-prev {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d5db;
}

.wqc-prev:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.wqc-next,
.wqc-submit {
    background: linear-gradient(135deg, #eab308, #f59e0b);
    color: #000000;
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.25);
}

.wqc-next:hover,
.wqc-submit:hover {
    background: linear-gradient(135deg, #facc15, #fbbf24);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.35);
}

.required {
    color: #ef4444;
    margin-left: 3px;
}

/* ── Running Total ── */
.wqc-step-total {
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(234, 179, 8, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wqc-total-label {
    font-weight: 500;
    color: #d1d5db;
    font-size: 0.95rem;
}

.wqc-total-amount {
    font-weight: 700;
    font-size: 1.3rem;
    color: #eab308;
}

/* ── GDPR ── */
.wqc-gdpr {
    margin-bottom: 16px;
}

.wqc-gdpr label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #9ca3af;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.wqc-gdpr input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #eab308;
}

/* ── Success Message ── */
.wqc-success-message {
    text-align: center;
    padding: 40px 20px;
}

.wqc-success-icon {
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 16px;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.wqc-success-message h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}

.wqc-success-message p {
    color: #9ca3af;
    font-size: 1rem;
}

#wqc-message {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    #wqc-calculator-wrapper {
        padding: 24px;
        margin: 1rem;
        border-radius: 14px;
    }

    .wqc-scenario-grid {
        grid-template-columns: 1fr;
    }

    .wqc-scenario-step h3 {
        font-size: 1.5rem;
    }

    .wqc-step h3 {
        font-size: 1.3rem;
    }

    .wqc-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .wqc-nav {
        flex-direction: column;
        gap: 12px;
    }

    .wqc-nav .wqc-next,
    .wqc-nav .wqc-prev {
        width: 100%;
        text-align: center;
    }
}