/**
 * B2B Leadgenerator Styles
 *
 * Styles for the B2B-focused lead generator with stepwise funnel.
 * Uses split-view layout on desktop (left: questions, right: info panel).
 *
 * Breakpoints:
 * - Desktop: 1440px design width
 * - Tablet: max-width 1024px
 * - Mobile: max-width 768px
 * - Small mobile: max-width 480px
 *
 * File structure:
 * - BASE: CSS variables, resets, typography
 * - LAYOUT: Container, split view, grid structures
 * - COMPONENTS: UI components (buttons, forms, cards, etc.)
 * - UTILITIES: Helper classes
 * - COMPONENTS CONTINUED: Theme variants & complex components
 *
 * Note: @layer was removed due to conflicts with existing theme CSS
 * that doesn't use CSS layers (unlayered styles have higher priority).
 */

/* Alpine.js cloak - hide elements until Alpine initializes */
[x-cloak] { display: none !important; }

/* ==========================================================================
   BASE - CSS Variables, Resets, Typography
   ========================================================================== */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --b2b-color-primary: #0F6F5C;
    --b2b-color-primary-faded: rgba(15, 111, 92, 0.24);
    --b2b-color-secondary: #F9D0CD;
    --b2b-color-secondary-text-accent: #404040;

    --b2b-color-slate-200: #E2E8F0;
    --b2b-color-slate-400: rgb(148 163 184);
    --b2b-color-slate-500: #64748B;
    --b2b-color-slate-600: #475569;
    --b2b-color-slate-900: rgb(15 23 42);
    --b2b-color-text-muted: var(--b2b-color-slate-500);

    --b2b-color-bg-highlight: #FAF9F7;
    --b2b-color-bg-secondary: #F8F5ED;
    --b2b-color-white: #FFFFFF;
    --b2b-color-text: #3D3C41;

    /* Figma design tokens */
    --text-medium-emphasis: #434242;
    --border-high-emphasis: #94A3B8;

    --b2b-font-primary: 'Gilroy', sans-serif;
    --b2b-font-medium: 'GilroyMedium', sans-serif;

    --b2b-border-radius-full: 9999px;
    --b2b-border-radius-lg: 16px;
    --b2b-border-radius-md: 12px;

    --b2b-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --b2b-shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.12);

    /* ============================================
       Legacy variable aliases (from inline template)
       Maps short names to canonical --b2b-color-* tokens
       ============================================ */
    --b2b-primary: var(--b2b-color-primary);
    --b2b-primary-light: var(--b2b-color-primary-faded);
    --b2b-secondary: var(--b2b-color-secondary);
    --b2b-bg: var(--b2b-color-bg-secondary);
    --b2b-bg-card: var(--b2b-color-bg-highlight);
    --b2b-text: var(--b2b-color-text);
    --b2b-text-light: var(--b2b-color-slate-500);
    --b2b-border: var(--b2b-color-slate-200);
    --b2b-success: #55A091;
    --b2b-error: #DC2626;
    --color-slate-400: #94A3B8;
    --color-slate-900: #0F172A;
    --color-white: #FFFFFF;
}

/* ==========================================================================
   LAYOUT - Container, Split View, Grid Structures
   ========================================================================== */

/* ============================================
   Base Container & Layout
   ============================================ */
.b2b-leadgen {
    min-height: 100vh;
    background-color: var(--b2b-color-bg-highlight);
}

.b2b-leadgen__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
}

/* Split-view layout for desktop */
.b2b-leadgen__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .b2b-leadgen__split {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

/* ============================================
   Left Panel (Questions)
   ============================================ */
.b2b-leadgen__left {
    display: flex;
    flex-direction: column;
    padding: 48px 64px;
    background-color: var(--b2b-color-white);
}

@media (max-width: 1024px) {
    .b2b-leadgen__left {
        padding: 32px 40px;
    }
}

@media (max-width: 768px) {
    .b2b-leadgen__left {
        padding: 24px 16px;
        min-height: auto;
    }
}

.b2b-leadgen__left-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 536px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   Right Panel (Info/Summary)
   ============================================ */
.b2b-leadgen__right {
    display: flex;
    flex-direction: column;
    padding: 48px 64px;
    background-color: var(--b2b-color-bg-secondary);
    position: relative;
}

@media (max-width: 1024px) {
    .b2b-leadgen__right {
        padding: 32px 40px;
    }
}

@media (max-width: 768px) {
    .b2b-leadgen__right {
        display: none;
    }

    .b2b-leadgen__right--mobile-visible {
        display: flex;
        padding: 24px 16px;
    }
}

.b2b-leadgen__right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   Legacy Split Layout (migrated from legacy.css)
   ============================================ */
.b2b-card {
    background: var(--b2b-bg);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
}

.b2b-card--split {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    border-radius: 0;
    background: transparent;
}

.b2b-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    text-align: left;
    min-height: calc(100vh - 88px);
}

.b2b-split--beige {
    background: var(--b2b-color-bg-secondary);
}

.b2b-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-sidebar--beige {
    background-color: var(--b2b-color-bg-secondary);
    border-radius: 0;
    padding: 48px;
}

.b2b-sidebar-content {
    max-width: 467px;
}

.b2b-main-content {
    max-width: 480px;
    width: 100%;
}

/* Wider content wrapper for Step 8 (personalia form) */
.b2b-main-content--wide {
    max-width: 560px;
}

/* Step 8: Allow main section to take more width */
.b2b-main--wide {
    flex: 1.2;
}

@media (max-width: 768px) {
    .b2b-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    /* Prevent grid children from overflowing on mobile */
    .b2b-split > * {
        min-width: 0;
        max-width: 100%;
    }

    .b2b-sidebar {
        display: none;
    }

    .b2b-sidebar--beige {
        padding: 24px 16px;
    }
}

/* ==========================================================================
   COMPONENTS - UI Components (buttons, forms, cards, etc.)
   ========================================================================== */

/* Centered card variant for simple screens like Vendor Selection */
.b2b-card--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    background: var(--b2b-color-white);
    padding: 48px;
}

.b2b-card--centered .b2b-title {
    color: var(--color-slate-900);
}

/* ============================================
   Legacy Components (migrated from legacy.css)
   ============================================ */

/* Intro text styling */
.b2b-intro {
    font-family: var(--b2b-font-primary);
    font-size: 20px;
    line-height: 1.4;
    color: #000000;
    margin: 0 0 16px;
}

/* Info Card */
.b2b-info-card {
    background: var(--b2b-color-bg-highlight);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
}

.b2b-info-card--highlight {
    background: rgba(15, 111, 92, 0.08);
    border-left: 4px solid var(--b2b-color-primary);
    text-align: left;
    margin-top: 24px;
    display: block;
}

.b2b-info-card--soft .b2b-info-text {
    max-width: 410px;
}

.b2b-info-title {
    font-family: var(--b2b-font-medium);
    font-size: 18px;
    font-weight: 600;
    color: var(--b2b-text);
    margin: 0 0 12px;
}

.b2b-info-text {
    font-size: 16px;
    color: #000000;
    margin: 0;
    line-height: 1.5;
}

/* Title and subtitle */
.b2b-title {
    color: var(--b2b-text);
    font-family: var(--b2b-font-medium);
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 8px;
}

.b2b-subtitle {
    color: var(--b2b-text-light);
    font-size: 16px;
    margin: 0 0 32px;
}

/* Trustpilot badge component */
.b2b-trustpilot-badge {
    margin-top: 16px;
}

.b2b-trustpilot-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.b2b-trustpilot-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #00b67a;
    color: var(--b2b-color-white);
    font-size: 18px;
    line-height: 1;
}

.b2b-trustpilot-count {
    font-size: 14px;
    color: #000000;
    margin: 0;
}

/* Partner logo variants */
.b2b-partner-logo--securitas {
    height: 24px;
    width: auto;
    margin-top: 16px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Options grid 2x2 */
.b2b-options--grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Ensure 2x2 grid is maintained on mobile */
@media (max-width: 768px) {
    .b2b-options--grid-2x2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .b2b-options--grid-2x2 .b2b-option--pill {
        padding: 14px 12px;
        font-size: 16px;
        min-height: 52px;
    }
}

/* Mini price display (in sidebar) */
.b2b-mini-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin: 16px 0;
}

.b2b-mini-price-amount {
    font-family: var(--b2b-font-medium);
    font-size: 32px;
    font-weight: 700;
    color: var(--b2b-color-primary);
}

.b2b-mini-price-period {
    font-size: 16px;
    color: var(--b2b-text-light);
    margin-left: 2px;
}

.b2b-mini-price--loading .b2b-mini-price-amount {
    font-size: 18px;
    color: var(--b2b-text-light);
    font-weight: 400;
}

/* Price breakdown table */
.b2b-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.b2b-price-label {
    font-size: 14px;
    color: var(--b2b-text);
    flex: 1;
}

.b2b-price-value {
    font-family: var(--b2b-font-medium);
    font-size: 14px;
    font-weight: 600;
    color: var(--b2b-text);
    text-align: right;
}

.b2b-price-value-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.b2b-price-value--original {
    text-decoration: line-through;
    color: var(--b2b-text-light);
    font-weight: 400;
}

/* Progress bar legacy variants */
.b2b-progress--light {
    background: rgba(255, 255, 255, 0.3);
    margin-top: 48px;
}

.b2b-progress--light .b2b-progress-bar {
    background: var(--b2b-color-white);
}

/* Back button for dark containers */
.b2b-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: var(--b2b-color-white);
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.b2b-back:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Vendor options - vertical stack */
.b2b-options--vendor {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin: 32px auto 0;
}

.b2b-options--vendor .b2b-option--pill {
    background: var(--b2b-color-white);
    border: 1px solid var(--b2b-color-slate-400);
    color: var(--text-medium-emphasis);
    padding: 16px 32px;
    border-radius: var(--b2b-border-radius-full);
    font-family: var(--b2b-font-medium);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.b2b-options--vendor .b2b-option--pill:hover {
    background: var(--b2b-color-primary);
    border-color: var(--b2b-color-primary);
    color: var(--b2b-color-white);
}

/* ============================================
   Step Content
   ============================================ */
.b2b-step {
    display: none;
}

.b2b-step.active {
    display: block;
}

.b2b-step__overtitle {
    font-family: var(--b2b-font-medium);
    font-size: 16px;
    color: var(--b2b-color-primary);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2b-step__title {
    font-family: var(--b2b-font-medium);
    font-size: 32px;
    font-weight: 500;
    color: var(--b2b-color-text);
    margin: 0 0 32px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .b2b-step__title {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

.b2b-step__description {
    font-family: var(--b2b-font-primary);
    font-size: 16px;
    color: var(--b2b-color-slate-500);
    line-height: 1.6;
    margin: 0 0 24px;
}

/* ============================================
   Options / Answer Buttons
   ============================================ */
.b2b-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
}

.b2b-options--two-col {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .b2b-options--two-col {
        grid-template-columns: 1fr;
    }
}

.b2b-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    min-height: 56px;
    width: 100%;

    font-family: var(--b2b-font-primary);
    font-size: 20px;
    font-weight: 400;
    line-height: 20px;
    color: var(--text-medium-emphasis);
    text-align: center;

    background: var(--b2b-color-white);
    border: 1px solid var(--border-high-emphasis);
    border-radius: var(--b2b-border-radius-full);

    cursor: pointer;
    transition: all 0.2s ease;
}

.b2b-option:hover {
    background-color: var(--b2b-color-primary);
    border-color: var(--b2b-color-primary);
    color: var(--b2b-color-white);
}

.b2b-option:focus {
    outline: none;
}

.b2b-option:focus-visible {
    outline: 2px solid var(--b2b-color-primary);
    outline-offset: 2px;
}

.b2b-option--selected {
    background-color: var(--b2b-color-primary);
    border-color: var(--b2b-color-primary);
    color: var(--b2b-color-white);
}

/* ============================================
   Primary Button
   ============================================ */
.b2b-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 20px 32px;
    width: 100%;

    font-family: var(--b2b-font-primary);
    font-size: 16px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;

    border: none;
    border-radius: var(--b2b-border-radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.b2b-btn--primary {
    background-color: var(--b2b-color-primary);
    color: var(--b2b-color-white);
}

.b2b-btn--primary:hover {
    background-color: var(--b2b-color-secondary);
    color: var(--b2b-color-secondary-text-accent);
}

.b2b-btn--primary:disabled {
    background-color: var(--b2b-color-primary-faded);
    cursor: not-allowed;
}

.b2b-btn--secondary {
    background: rgba(255, 255, 255, 0.32);
    border: 1px solid var(--b2b-color-slate-400);
    color: var(--b2b-color-slate-900);
}

.b2b-btn--secondary:hover {
    background-color: var(--b2b-color-primary);
    border-color: var(--b2b-color-primary);
    color: var(--b2b-color-white);
}

/* ============================================
   Form Styles
   ============================================ */
.b2b-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.b2b-form__field {
    position: relative;
}

.b2b-form__label {
    display: block;
    position: absolute;
    top: -10px;
    left: 24px;
    padding: 0 4px;
    background: var(--b2b-color-white);

    font-family: var(--b2b-font-medium);
    font-size: 14px;
    font-weight: 600;
    color: var(--b2b-color-slate-500);

    transition: color 0.2s ease;
}

.b2b-form__field:focus-within .b2b-form__label {
    color: var(--b2b-color-primary);
}

.b2b-form__input {
    width: 100%;
    padding: 16px 24px;
    min-height: 56px;

    font-family: var(--b2b-font-primary);
    font-size: 18px;
    line-height: 1.33;
    color: var(--b2b-color-slate-900);

    background: transparent;
    border: 2px solid var(--b2b-color-slate-200);
    border-radius: var(--b2b-border-radius-full);

    transition: border-color 0.2s ease;
}

.b2b-form__input:focus {
    outline: none;
    border-color: var(--b2b-color-primary);
}

.b2b-form__input::placeholder {
    color: var(--b2b-color-slate-400);
}

.b2b-form__input--error {
    border-color: #EF4444;
}

/* Contact form specific styling - Figma spec */
.b2b-form--contact {
    gap: 24px;
    margin-top: 40px;
}

.b2b-form--contact .b2b-form__input {
    border-color: var(--b2b-color-slate-400);
}

.b2b-form--contact .b2b-btn {
    margin-top: 16px;
}

/* Ensure global theme input styles don't override B2B form controls */
#b2b-leadgen .b2b-form__input {
    padding: 16px 24px !important;
    border-radius: 9999px !important;
    border: 2px solid var(--b2b-color-slate-200) !important;
    box-sizing: border-box;
}

#b2b-leadgen .b2b-form {
    gap: 20px !important;
}

#b2b-leadgen .b2b-form--contact {
    gap: 24px !important;
}

#b2b-leadgen .b2b-form--contact .b2b-form__input {
    border-color: var(--b2b-color-slate-400) !important;
}

/* Personalia form specific styling - matches original leadgen */
.b2b-form--personalia {
    gap: 24px;
    margin-top: 32px;
}

.b2b-form--personalia .b2b-form__input {
    border-color: var(--b2b-color-slate-400);
}

.b2b-form--personalia .b2b-form__input[type="date"] {
    height: 60px;
}

/* Postal row - side by side fields */
.b2b-form__row--postal {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .b2b-form__row--postal {
        grid-template-columns: 1fr;
    }
}

/* Checkbox styling for form */
.b2b-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0;
}

.b2b-form__checkbox input[type="checkbox"] {
    display: block !important;
    margin-top: 4px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--b2b-color-primary);
    -webkit-appearance: checkbox;
    appearance: checkbox;
}

.b2b-form__checkbox input[type="checkbox"]:focus {
    outline: 2px solid var(--b2b-color-primary);
    outline-offset: 3px;
}

.b2b-form__checkbox input[type="checkbox"]:focus:not(:focus-visible) {
    outline: none;
}

.b2b-form__checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--b2b-color-primary);
    outline-offset: 3px;
}

.b2b-form__checkbox label {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-medium-emphasis);
}

.b2b-form__checkbox label a,
.b2b-link {
    color: var(--b2b-color-primary);
    text-decoration: underline;
}

.b2b-form__checkbox label a:hover,
.b2b-link:hover {
    color: #0A5A4A;
}

/* Form error styling */
.b2b-form__error {
    display: block;
    font-family: var(--b2b-font-primary);
    font-size: 12px;
    color: #EF4444;
    margin-top: 4px;
    padding-left: 24px;
}

.b2b-form__field--error .b2b-form__input {
    border-color: #EF4444;
}

.b2b-form__field--error .b2b-form__label {
    color: #EF4444;
}

/* Full-width button */
.b2b-btn--full {
    width: 100%;
}

/* Select dropdown */
.b2b-form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748B' 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 20px center;
    background-size: 20px;
    padding-right: 56px;
}

/* Textarea */
.b2b-form__textarea {
    border-radius: var(--b2b-border-radius-lg);
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   Progress Indicator
   ============================================ */
.b2b-progress {
    margin-top: auto;
    padding-top: 32px;
}

.b2b-progress__text {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--b2b-color-slate-500);
    margin: 0 0 8px;
    text-align: center;
}

.b2b-progress__bar {
    height: 8px;
    background-color: var(--b2b-color-slate-200);
    border-radius: var(--b2b-border-radius-full);
    overflow: hidden;
}

.b2b-progress__fill {
    height: 100%;
    background-color: var(--b2b-color-primary);
    border-radius: var(--b2b-border-radius-full);
    transition: width 0.3s ease;
}

.b2b-progress__back {
    display: block;
    margin-top: 12px;

    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-slate-500);
    text-align: center;
    text-decoration: underline;

    cursor: pointer;
    transition: color 0.2s ease;
}

.b2b-progress__back:hover {
    color: var(--b2b-color-primary);
}

/* ============================================
   Product Cards
   ============================================ */
.b2b-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .b2b-products {
        grid-template-columns: 1fr;
    }
}

.b2b-product-card {
    background: var(--b2b-color-white);
    border: 1px solid var(--b2b-color-slate-200);
    border-radius: var(--b2b-border-radius-lg);
    padding: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    cursor: pointer;
    transition: all 0.2s ease;
}

.b2b-product-card:hover {
    border-color: var(--b2b-color-primary);
    box-shadow: var(--b2b-shadow-card);
}

.b2b-product-card--selected {
    border-color: var(--b2b-color-primary);
    border-width: 2px;
    background-color: var(--b2b-color-primary-faded);
}

.b2b-product-card__image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
}

.b2b-product-card__name {
    font-family: var(--b2b-font-medium);
    font-size: 16px;
    font-weight: 500;
    color: var(--b2b-color-text);
    margin: 0 0 4px;
}

.b2b-product-card__description {
    font-family: var(--b2b-font-primary);
    font-size: 13px;
    color: var(--b2b-color-slate-500);
    margin: 0 0 12px;
    line-height: 1.4;
}

.b2b-product-card__price {
    font-family: var(--b2b-font-medium);
    font-size: 18px;
    font-weight: 600;
    color: var(--b2b-color-primary);
}

.b2b-product-card__quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.b2b-product-card__qty-btn {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: 600;

    background: var(--b2b-color-bg-highlight);
    border: 1px solid var(--b2b-color-slate-200);
    border-radius: 50%;

    cursor: pointer;
    transition: all 0.2s ease;
}

.b2b-product-card__qty-btn:hover {
    background: var(--b2b-color-primary);
    border-color: var(--b2b-color-primary);
    color: var(--b2b-color-white);
}

.b2b-product-card__qty-value {
    font-family: var(--b2b-font-medium);
    font-size: 18px;
    font-weight: 600;
    color: var(--b2b-color-text);
    min-width: 24px;
    text-align: center;
}

/* ============================================
   Product Selection (Step 7) - Figma spec
   ============================================ */
.b2b-card--product-select {
    background: var(--b2b-color-white);
    border-radius: var(--b2b-border-radius-lg);
    padding: 32px;
    max-width: 600px;
    margin: 0 auto;
}

.b2b-product-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 24px;
}

.b2b-product-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--b2b-color-slate-200);
}

.b2b-product-item:last-child {
    border-bottom: none;
}

.b2b-product-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: var(--b2b-color-bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.b2b-product-image img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.b2b-product-placeholder {
    width: 40px;
    height: 40px;
    background: var(--b2b-color-slate-200);
    border-radius: 8px;
}

.b2b-product-info {
    flex: 1;
    min-width: 0;
}

.b2b-product-name {
    display: block;
    font-family: var(--b2b-font-medium);
    font-size: 16px;
    font-weight: 500;
    color: var(--b2b-color-text);
    margin-bottom: 4px;
}

.b2b-product-desc {
    display: block;
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-slate-500);
    line-height: 1.4;
}

.b2b-product-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.b2b-qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: none;
    flex-grow: 0;
    background: transparent;
    color: var(--b2b-color-primary);
}

.b2b-qty-btn:hover:not(:disabled) {
    background: var(--b2b-color-primary-faded);
}

.b2b-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.b2b-qty-btn--minus {
    background: transparent;
    border: none;
    color: var(--b2b-color-primary);
}

.b2b-qty-btn--minus:hover:not(:disabled) {
    background: var(--b2b-color-primary-faded);
}

.b2b-qty-btn--plus {
    background: var(--b2b-color-primary-faded);
    border: none;
    color: var(--b2b-color-primary);
}

.b2b-qty-btn--plus:hover:not(:disabled) {
    background: var(--b2b-color-primary-faded);
}

.b2b-qty-btn__icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

.b2b-qty-btn__icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.b2b-qty-value {
    font-family: var(--b2b-font-medium);
    font-size: 18px;
    font-weight: 500;
    color: var(--b2b-color-text);
    min-width: 24px;
    text-align: center;
}

.b2b-product-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--b2b-color-slate-200);
}

.b2b-product-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.b2b-product-total-label {
    font-family: var(--b2b-font-primary);
    font-size: 16px;
    color: var(--b2b-color-slate-600);
}

.b2b-product-total-amount {
    font-family: var(--b2b-font-medium);
    font-size: 20px;
    font-weight: 600;
    color: var(--b2b-color-text);
}

.b2b-product__monthly {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-slate-500);
    text-align: right;
    margin-top: 4px;
}

/* ============================================
   Summary Panel (Right Side)
   ============================================ */
.b2b-summary {
    background: var(--b2b-color-white);
    border-radius: var(--b2b-border-radius-lg);
    padding: 24px;
    box-shadow: var(--b2b-shadow-card);
}

.b2b-summary__title {
    font-family: var(--b2b-font-medium);
    font-size: 20px;
    font-weight: 500;
    color: var(--b2b-color-text);
    margin: 0 0 20px;
}

.b2b-summary__items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b2b-summary__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--b2b-color-slate-200);
}

.b2b-summary__item:last-child {
    border-bottom: none;
}

.b2b-summary__item-name {
    font-family: var(--b2b-font-primary);
    font-size: 15px;
    color: var(--b2b-color-text);
}

.b2b-summary__item-qty {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-slate-500);
}

.b2b-summary__item-price {
    font-family: var(--b2b-font-medium);
    font-size: 15px;
    font-weight: 500;
    color: var(--b2b-color-text);
}

.b2b-summary__divider {
    height: 1px;
    background: var(--b2b-color-slate-200);
    margin: 16px 0;
}

.b2b-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b2b-summary__total-label {
    font-family: var(--b2b-font-medium);
    font-size: 16px;
    font-weight: 500;
    color: var(--b2b-color-text);
}

.b2b-summary__total-price {
    font-family: var(--b2b-font-medium);
    font-size: 24px;
    font-weight: 600;
    color: var(--b2b-color-primary);
}

.b2b-summary__monthly {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-slate-500);
    text-align: right;
    margin-top: 4px;
}

/* ============================================
   Info Box
   ============================================ */
.b2b-info-box {
    background: var(--b2b-color-bg-highlight);
    border-radius: var(--b2b-border-radius-lg);
    padding: 20px;
    margin-top: 24px;
}

.b2b-info-box__title {
    display: flex;
    align-items: center;
    gap: 8px;

    font-family: var(--b2b-font-medium);
    font-size: 16px;
    font-weight: 500;
    color: var(--b2b-color-text);
    margin: 0 0 12px;
}

.b2b-info-box__icon {
    width: 20px;
    height: 20px;
    color: var(--b2b-color-primary);
}

.b2b-info-box__text {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-slate-500);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Trust Indicators
   ============================================ */
.b2b-trust {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
    padding-top: 32px;
}

.b2b-trust__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.b2b-trust__logo {
    height: 32px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.b2b-trust__logo:hover {
    opacity: 1;
}

/* ============================================
   Mobile Sticky Footer
   ============================================ */
@media (max-width: 768px) {
    .b2b-leadgen__footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;

        background: var(--b2b-color-white);
        padding: 16px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);

        z-index: 100;
    }

    .b2b-leadgen__footer .b2b-btn {
        margin: 0;
    }

    /* Add bottom padding to main content to account for sticky footer */
    .b2b-leadgen__left {
        padding-bottom: 100px;
    }
}

/* ============================================
   Error & Validation States
   ============================================ */
.b2b-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--b2b-border-radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.b2b-error__text {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: #DC2626;
    margin: 0;
}

/* ============================================
   Loading State
   ============================================ */
.b2b-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.b2b-loading__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--b2b-color-slate-200);
    border-top-color: var(--b2b-color-primary);
    border-radius: 50%;
    animation: b2b-spin 0.8s linear infinite;
}

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

.b2b-loading__text {
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-slate-500);
}

/* ============================================
   Success Screen
   ============================================ */
.b2b-success {
    text-align: center;
    padding: 48px 24px;
}

.b2b-success__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--b2b-color-primary);
}

.b2b-success__title {
    font-family: var(--b2b-font-medium);
    font-size: 28px;
    font-weight: 500;
    color: var(--b2b-color-text);
    margin: 0 0 16px;
}

.b2b-success__text {
    font-family: var(--b2b-font-primary);
    font-size: 16px;
    color: var(--b2b-color-slate-500);
    line-height: 1.6;
    margin: 0 0 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   UTILITIES - Helper Classes
   ========================================================================== */

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

@media (min-width: 769px) {
    .b2b-mobile-visible-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .b2b-mobile-visible-only {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .b2b-desktop-visible-only {
        display: block !important;
    }

    /* Preserve flex layout for sidebar elements on desktop */
    .b2b-sidebar.b2b-desktop-visible-only {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .b2b-desktop-visible-only {
        display: none !important;
    }

    /* Show mobile sidebar with proper layout */
    .b2b-sidebar.b2b-mobile-visible-only {
        display: block !important;
    }
}

.b2b-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.b2b-text-center {
    text-align: center;
}

.b2b-mt-auto {
    margin-top: auto;
}

.b2b-mb-0 {
    margin-bottom: 0;
}

/* ==========================================================================
   COMPONENTS CONTINUED - Theme Variants & Complex Components
   
   NOTE: Step-specific styles have been moved to their respective template files:
   - Step 1 (dark theme, partner logos): step-01-has-alarm.php
   - Step 6 (contact form): step-06-contact-info.php
   - Step 7 (package builder): step-07-package-builder.php
   - Step 7a (cancel): step-07a-cancel.php
   - Step 7b (vendor): step-07b-vendor.php
   - Step 8 (personalia form): step-08-final-form.php
   - Step 9 (confirmation): step-09-confirmation.php
   - Bottom timeline: partials/bottom-timeline.php
   - Mobile footer: partials/mobile-footer.php
   ========================================================================== */

/* ============================================
   Partner Logos (Base)
   - Scoped to #b2b-leadgen so it reliably overrides template inline styles
   - Prevents logo overflow by allowing wrapping and constraining image width
   ============================================ */
#b2b-leadgen .b2b-partner-logos {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    width: 100%;
}

#b2b-leadgen .b2b-partner-logo {
    height: auto;
    max-height: 30px;
    width: auto;
    max-width: none;
    opacity: 1;
    flex-shrink: 1;
    min-width: 0;
    display: block;
}

@media (max-width: 480px) {
    #b2b-leadgen .b2b-info-card {
        padding: 20px;
    }

    #b2b-leadgen .b2b-partner-logos {
        gap: 10px;
    }

    #b2b-leadgen .b2b-partner-logo {
        max-height: 26px;
    }

    #b2b-leadgen .b2b-partner-logo--yale {
        max-height: 32px;
        max-width: 96px;
    }
}

@media (max-width: 360px) {
    #b2b-leadgen .b2b-partner-logos {
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    #b2b-leadgen .b2b-partner-logo {
        max-width: 100%;
    }
}

/* NOTE: .b2b-partner-logos--step1 styles moved to step-01-has-alarm.php */

/* Yale logo - positioned at bottom of info card */
#b2b-leadgen .b2b-partner-logo--yale {
    height: auto;
    max-height: 40px;
    max-width: 112px;
    opacity: 1;
    margin-top: 16px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* ============================================
   Pill Button Variants (Ja/Nei style)
   ============================================ */
.b2b-options--pill {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 32px;
}

.b2b-option--pill {
    flex: 1;
    min-width: 120px;
    padding: 18px 32px;
    font-size: 20px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .b2b-options--pill {
        flex-direction: column;
    }

    .b2b-option--pill {
        min-width: 100%;
    }
}

/* ============================================
   Grid Layout (2x2 for entrance counts)
   ============================================ */
.b2b-options--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.b2b-option--small {
    min-height: 64px;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .b2b-options--grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .b2b-option--small {
        min-height: 56px;
        padding: 12px 16px;
        font-size: 16px;
    }
}

/* ============================================
   Business Type Buttons (with label/desc)
   ============================================ */
.b2b-option-label {
    display: block;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.3;
}

.b2b-option-desc {
    display: block;
    font-weight: 400;
    font-size: 14px;
    opacity: 0.7;
    margin-top: 4px;
}

/* Multi-line buttons need flex column */
.b2b-option:has(.b2b-option-label) {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px 24px;
}

/* NOTE: Dark mode option styles defined earlier (lines ~1257-1286) */

/* ============================================
   Dark Mode Form Styling
   ============================================ */
.b2b-form--dark {
    margin-top: 32px;
}

.b2b-form--dark .b2b-form__field {
    margin-bottom: 20px;
}

.b2b-form--dark .b2b-form__label {
    color: var(--b2b-color-white);
    font-family: var(--b2b-font-medium);
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.b2b-form--dark .b2b-form__input {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--b2b-font-primary);
    font-size: 16px;
    color: var(--b2b-color-text);
    background: var(--b2b-color-white);
    border: 2px solid transparent;
    border-radius: var(--b2b-border-radius-full);
    transition: border-color 0.2s ease;
}

.b2b-form--dark .b2b-form__input:focus {
    outline: none;
    border-color: var(--b2b-color-primary);
}

.b2b-form--dark .b2b-form__input::placeholder {
    color: var(--b2b-color-slate-400);
}

.b2b-form--dark .b2b-form__checkbox {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin: 24px 0;
}

.b2b-form--dark .b2b-form__checkbox a {
    color: var(--b2b-color-white);
    text-decoration: underline;
}

.b2b-form--dark .b2b-form__error {
    color: var(--b2b-error);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.b2b-form--dark .b2b-form__field--error .b2b-form__input {
    border-color: var(--b2b-error);
}

.b2b-form--dark .b2b-error {
    background: rgba(220, 38, 38, 0.2);
    color: var(--b2b-error);
    padding: 12px 16px;
    border-radius: var(--b2b-border-radius-md);
    margin-top: 16px;
    font-size: 14px;
}

/* Checkbox styling */
.b2b-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.b2b-form-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--b2b-color-primary);
}

.b2b-form-checkbox label {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.b2b-form-checkbox label a {
    color: var(--b2b-color-white);
    text-decoration: underline;
}

.b2b-form-checkbox .b2b-form-error {
    width: 100%;
    margin-top: 4px;
    color: #FF6B6B;
    font-size: 12px;
}

/* Info list styling */
.b2b-info-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.b2b-info-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-family: var(--b2b-font-primary);
    font-size: 14px;
    color: var(--b2b-color-text);
    line-height: 1.4;
}

.b2b-info-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--b2b-color-primary);
    font-weight: bold;
}

/* Trustpilot widget container */
.b2b-trustpilot-widget {
    margin-top: 16px;
}

#b2b-leadgen .b2b-trustpilot-widget {
    position: relative;
    max-height: 125px;
    overflow: hidden;
}

#b2b-leadgen .b2b-trustpilot-widget iframe {
    display: block;
    width: 100% !important;
    height: 125px !important;
    max-height: 125px !important;
    min-height: unset !important;
    margin: 0;
}

@media (max-width: 768px) {
    #b2b-leadgen .b2b-trustpilot-widget {
        max-height: 110px;
    }

    #b2b-leadgen .b2b-trustpilot-widget iframe {
        height: 110px !important;
        max-height: 110px !important;
    }
}

/* Small text variant */
.b2b-info-text--small {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 8px;
    font-style: italic;
}

/* NOTE: Why Homely section, Cancel step layout, and Benefits grid styles 
   have been moved to step-07a-cancel.php */

/* NOTE: Bottom timeline styles have been moved to partials/bottom-timeline.php */

/* NOTE: Package Builder styles (product cards, price summary, why section,
   reviews carousel, mobile footer) have been moved to:
   - step-07-package-builder.php
   - partials/mobile-footer.php */

/* ==========================================================================
   Progress Bar Cleanup - Hide in-step progress bars (duplicate of bottom timeline)
   ========================================================================== */

/* Hide the in-step progress bars globally - the fixed bottom timeline serves this purpose */
.b2b-progress--light {
    display: none !important;
}

/* Also hide the progress bar styling from dark containers */
.b2b-main--dark .b2b-progress,
.b2b-main--dark .b2b-progress.b2b-progress--light {
    display: none !important;
}
