/* ==========================================================================
 * Amicell Exhibition Bot — Tablet-optimised stylesheet
 *
 * Brand colours match existing Amicell bot:
 *   --brand-red:   #95000d
 *   --ink:         #010101
 * Font: Hanken Grotesk (loaded by parent theme)
 *
 * Touch targets follow Apple/Material guidance (>= 44px), but most are
 * deliberately larger (>= 64px) for booth use with gloves / quick taps.
 * ========================================================================== */

:root {
    --exbot-brand:        #95000d;
    --exbot-brand-dark:   #6b0009;
    --exbot-brand-light:  #fdeaeb;
    --exbot-ink:          #010101;
    --exbot-text:         #1f2937;
    --exbot-text-muted:   #6b7280;
    --exbot-bg:           #ffffff;
    --exbot-bg-alt:       #f9fafb;
    --exbot-border:       #e5e7eb;
    --exbot-border-strong:#d1d5db;
    --exbot-success:      #059669;
    --exbot-radius:       12px;
    --exbot-radius-lg:    16px;
    --exbot-shadow:       0 4px 12px rgba(0,0,0,.08);
    --exbot-shadow-lg:    0 10px 30px rgba(0,0,0,.12);
}

/* Force white page background (overrides theme dark backgrounds) */
body.exbot-fullscreen,
body.page-template-page-exhibition-bot,
body.page-template-page-exhibition-bot main,
body.page-template-page-exhibition-bot .site-content {
    background: #ffffff !important;
    color: var(--exbot-ink) !important;
}
body.page-template-page-exhibition-bot {
    margin: 0 !important;
    padding: 0 !important;
}
body.page-template-page-exhibition-bot #wpadminbar,
body.page-template-page-exhibition-bot .site-header,
body.page-template-page-exhibition-bot .site-footer,
body.page-template-page-exhibition-bot header.site-header,
body.page-template-page-exhibition-bot footer.site-footer {
    display: none !important;
}

/* Reset within bot container so theme styles don't leak in */
.exbot-app, .exbot-app * {
    box-sizing: border-box;
}
.exbot-app {
    font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif !important;
    color: var(--exbot-ink) !important;
    background: #ffffff !important;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 24px 60px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Loading splash */
.exbot-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 80px 0;
    color: var(--exbot-text-muted);
}
.exbot-spinner {
    width: 50px; height: 50px;
    border: 4px solid var(--exbot-border);
    border-top-color: var(--exbot-brand);
    border-radius: 50%;
    animation: exbot-spin 0.8s linear infinite;
    margin-bottom: 16px;
}
@keyframes exbot-spin { to { transform: rotate(360deg); } }

/* Headers */
.exbot-header {
    margin-bottom: 36px;
    text-align: center;
    position: relative;
}
.exbot-header h1, .exbot-header h2 {
    font-size: 38px !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--exbot-ink) !important;
}
.exbot-subtitle {
    font-size: 22px !important;
    color: var(--exbot-text-muted) !important;
    margin: 0 !important;
    line-height: 1.4;
    font-weight: 500 !important;
}
.exbot-section-header {
    text-align: center;
    margin: 30px 0 24px;
}
.exbot-section-header h2, .exbot-section-header h3 {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin: 0 0 10px !important;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--exbot-ink) !important;
    text-transform: capitalize;
}
.exbot-step-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center;
    margin: 30px 0 24px !important;
    letter-spacing: -0.02em;
    color: var(--exbot-ink) !important;
}

/* Back buttons */
.exbot-back-btn,
.exbot-back-btn-floating {
    background: transparent !important;
    border: 2px solid var(--exbot-border-strong) !important;
    color: var(--exbot-text) !important;
    padding: 10px 18px !important;
    border-radius: var(--exbot-radius) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit !important;
    margin-bottom: 16px;
    display: inline-block;
}
.exbot-back-btn-floating {
    position: sticky;
    top: 8px;
    z-index: 10;
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(4px);
}
.exbot-back-btn:hover, .exbot-back-btn-floating:hover {
    border-color: var(--exbot-ink) !important;
    background: var(--exbot-bg-alt) !important;
}
.exbot-header .exbot-back-btn {
    position: absolute;
    top: 0; left: 0;
    margin: 0;
}

.exbot-divider-line {
    border: 0;
    border-top: 1px solid var(--exbot-border);
    margin: 36px 0;
}

/* ==========================================================================
 * Buttons (generic CTAs)
 * ========================================================================== */
.exbot-btn {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 28px !important;
    border-radius: var(--exbot-radius) !important;
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-decoration: none !important;
    border: 2px solid transparent !important;
    transition: all 0.2s;
    line-height: 1 !important;
    min-height: 56px;
}
.exbot-btn-primary {
    background: var(--exbot-brand) !important;
    border-color: var(--exbot-brand) !important;
    color: #fff !important;
}
.exbot-btn-primary:hover, .exbot-btn-primary:active {
    background: var(--exbot-brand-dark) !important;
    border-color: var(--exbot-brand-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--exbot-shadow);
}
.exbot-btn-primary:disabled {
    background: #9ca3af !important; border-color: #9ca3af !important; cursor: not-allowed; transform: none;
}
.exbot-btn-large {
    padding: 20px 36px !important;
    font-size: 20px !important;
    min-height: 64px;
}
.exbot-btn-xl {
    padding: 24px 56px !important;
    font-size: 24px !important;
    min-height: 72px;
    border-radius: 14px !important;
}
.exbot-btn-ghost {
    background: transparent !important;
    border-color: var(--exbot-border-strong) !important;
    color: var(--exbot-text) !important;
}
.exbot-btn-ghost:hover {
    background: var(--exbot-bg-alt) !important;
    border-color: var(--exbot-ink) !important;
}

.exbot-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
 * Welcome screen
 * ========================================================================== */
.exbot-welcome {
    text-align: center;
    padding: 60px 20px;
}
.exbot-welcome h1 {
    font-size: 56px !important;
    font-weight: 700 !important;
    letter-spacing: -0.04em;
    margin: 0 0 20px !important;
    color: var(--exbot-brand) !important;
}
.exbot-welcome .exbot-subtitle {
    font-size: 24px !important;
    margin-bottom: 50px !important;
}

/* ==========================================================================
 * Service Buttons (Step 1 — matches original bot exactly)
 * White bg, red border, red text → red bg + white text on hover/selected
 * ========================================================================== */
.exbot-service-buttons-row {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.exbot-service-btn {
    flex: 1;
    min-width: 200px;
    padding: 18px 20px !important;
    border: 2px solid var(--exbot-brand) !important;
    border-radius: 8px !important;
    color: var(--exbot-brand) !important;
    background: #fff !important;
    font-family: 'Hanken Grotesk', inherit !important;
    font-style: normal;
    font-weight: 600 !important;
    font-size: 18px !important;
    line-height: 110% !important;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: none;
}
.exbot-service-btn:hover, .exbot-service-btn:active {
    background: var(--exbot-brand) !important;
    color: #fff !important;
}
.exbot-service-btn-selected {
    background: var(--exbot-brand) !important;
    color: #fff !important;
}
@media (max-width: 768px) {
    .exbot-service-buttons-row { flex-direction: column; gap: 12px; }
    .exbot-service-btn { min-width: 100%; }
}

/* "Already have specs" shortcut */
.exbot-shortcut {
    text-align: center;
    margin: 20px 0;
}

/* ==========================================================================
 * Image Buttons Grid (matches original bot exactly)
 * Background image fills button, dark overlay, big white centered text
 * Hover: red overlay
 * ========================================================================== */
.exbot-image-buttons-grid {
    display: grid;
    gap: 18px;
    margin: 20px 0 30px;
}
.exbot-image-buttons-grid-2 { grid-template-columns: repeat(2, 1fr); }
.exbot-image-buttons-grid-3 { grid-template-columns: repeat(3, 1fr); }
.exbot-image-buttons-grid-4 { grid-template-columns: repeat(4, 1fr); }

.exbot-image-button {
    position: relative;
    height: 220px;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1f2937;
    border: none !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: inherit !important;
}
.exbot-image-button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.55));
    z-index: 0;
    transition: all 0.3s ease;
}
.exbot-image-button:hover::before, .exbot-image-button:active::before {
    background: linear-gradient(0deg, rgba(149,0,13,0.45), rgba(149,0,13,0.45));
}
.exbot-image-button-selected::before {
    background: linear-gradient(0deg, rgba(149,0,13,0.65), rgba(149,0,13,0.65)) !important;
}
.exbot-image-button-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.exbot-image-button-text {
    display: block;
    font-family: 'Hanken Grotesk', inherit !important;
    font-style: normal;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 110% !important;
    letter-spacing: -0.02em;
    text-transform: capitalize;
    color: #fff !important;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin: 0 !important;
}

/* Product card variant of image-button — title at top, View Product button at bottom */
.exbot-image-button-product {
    height: 240px;
    align-items: stretch;
    justify-content: stretch;
}
.exbot-image-button-product-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}
.exbot-image-button-product-title {
    font-family: 'Hanken Grotesk', inherit !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em;
    color: #fff !important;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    margin: 0 !important;
    text-transform: none;
}
.exbot-image-button-product-meta {
    font-family: 'Hanken Grotesk', inherit !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #fff !important;
    text-align: left;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    margin: 0 !important;
    opacity: 0.92;
}
.exbot-image-button-product .exbot-view-product-btn {
    margin-top: auto;
}

@media (max-width: 1024px) {
    .exbot-image-buttons-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .exbot-image-button { height: 180px; }
    .exbot-image-button-text { font-size: 22px !important; }
}
@media (max-width: 768px) {
    .exbot-image-buttons-grid-3, .exbot-image-buttons-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .exbot-image-button { height: 140px; }
    .exbot-image-button-text { font-size: 18px !important; }
}
@media (max-width: 480px) {
    .exbot-image-button { height: 110px; }
    .exbot-image-button-text { font-size: 16px !important; }
}

/* ==========================================================================
 * Shelf Products (per spec #5.1 — 4-3-3 row layout, no NEXT)
 * ========================================================================== */
.exbot-shelf-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}
.exbot-shelf-row-4 { grid-template-columns: repeat(4, 1fr); }
.exbot-shelf-row-3 { grid-template-columns: repeat(3, 1fr); }

/* Product card now uses image-button styles (see .exbot-image-button-product) */
/* Legacy fallback for non-image card layout (lab/showcase products with metadata): */
.exbot-product-card {
    background: var(--exbot-bg) !important;
    border: 2px solid var(--exbot-border-strong);
    border-radius: 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: all 0.2s;
    min-height: 280px;
}
.exbot-product-card:hover {
    border-color: var(--exbot-brand);
    box-shadow: var(--exbot-shadow);
    transform: translateY(-2px);
}
.exbot-product-image {
    width: 100%;
    height: 140px;
    background-color: #f3f4f6;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--exbot-border);
}
.exbot-product-body {
    padding: 16px;
    flex: 1;
    display: flex; flex-direction: column; justify-content: space-between;
    gap: 16px;
}
.exbot-product-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: var(--exbot-ink) !important;
    line-height: 1.25 !important;
}
.exbot-product-meta {
    font-size: 13px;
    color: var(--exbot-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* VIEW PRODUCT button — sized for use inside image-button-product overlays */
.exbot-view-product-btn {
    display: inline-block;
    align-self: flex-start;
    text-align: center;
    background: var(--exbot-brand) !important;
    color: #fff !important;
    border: 2px solid var(--exbot-brand) !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1 !important;
    font-family: inherit !important;
}
.exbot-view-product-btn:hover, .exbot-view-product-btn:active {
    background: var(--exbot-brand-dark) !important;
    border-color: #fff !important;
    transform: translateY(-2px);
    color: #fff !important;
}
.exbot-view-product-btn-disabled {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.4) !important;
    color: rgba(255,255,255,0.7) !important;
    cursor: not-allowed;
}

.exbot-footer-cta {
    text-align: center;
    padding: 32px;
    background: var(--exbot-bg-alt);
    border-radius: var(--exbot-radius);
    margin-top: 30px;
}
.exbot-footer-cta p {
    font-size: 18px;
    margin: 0 0 16px;
    color: var(--exbot-text);
}

/* ==========================================================================
 * Technical Information (per spec #5.2 — 3×3 grid)
 * ========================================================================== */
.exbot-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.exbot-tech-cell {
    background: var(--exbot-bg) !important;
    border: 3px solid var(--exbot-border-strong) !important;
    border-radius: var(--exbot-radius) !important;
    padding: 28px 20px !important;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit !important;
    text-align: center;
    min-height: 180px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 10px;
}
.exbot-tech-cell:not(:disabled):hover {
    border-color: var(--exbot-brand) !important;
    background: var(--exbot-brand-light) !important;
    transform: translateY(-2px);
    box-shadow: var(--exbot-shadow);
}
.exbot-tech-cell-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    /* Tint SVG to brand-red using filter (works on flat single-color SVGs) */
    filter: invert(8%) sepia(76%) saturate(7124%) hue-rotate(351deg) brightness(73%) contrast(102%);
}
.exbot-tech-cell-label {
    font-size: 17px;
    font-weight: 700;
    color: var(--exbot-ink) !important;
    line-height: 1.2;
}
.exbot-tech-cell-cta {
    font-size: 13px;
    font-weight: 700;
    color: var(--exbot-brand);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.exbot-tech-cell-inactive,
.exbot-tech-cell-empty {
    background: var(--exbot-bg-alt) !important;
    border-color: var(--exbot-border) !important;
    color: var(--exbot-text-muted) !important;
    cursor: not-allowed;
    box-shadow: none;
    font-size: 32px;
    font-weight: 300;
}

/* ==========================================================================
 * Q&A Options (BMS Design, Casing Design — small option buttons)
 * ========================================================================== */
.exbot-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.exbot-option-btn {
    position: relative;
    background: var(--exbot-bg) !important;
    border: 2px solid var(--exbot-border-strong) !important;
    border-radius: var(--exbot-radius) !important;
    padding: 18px 20px !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit !important;
    min-height: 60px;
    color: var(--exbot-text) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}
.exbot-option-btn:hover, .exbot-option-btn:active {
    border-color: var(--exbot-brand) !important;
    background: var(--exbot-brand-light) !important;
    color: var(--exbot-brand-dark) !important;
}
.exbot-option-btn-selected {
    border-color: var(--exbot-brand) !important;
    background: var(--exbot-brand) !important;
    color: #fff !important;
}
.exbot-option-btn-selected .exbot-option-label,
.exbot-option-btn-selected:hover .exbot-option-label,
.exbot-option-btn-selected { color: #fff !important; }
.exbot-option-label {
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
}
.exbot-option-btn-small {
    padding: 14px 16px !important;
    min-height: 52px;
    font-size: 15px !important;
}

/* Form group cards (for Q&A groups) */
.exbot-form-group-card {
    background: var(--exbot-bg-alt);
    border: 1px solid var(--exbot-border);
    border-radius: var(--exbot-radius);
    padding: 20px;
    margin-bottom: 18px;
}
.exbot-form-group-card h4 {
    margin: 0 0 14px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--exbot-ink) !important;
}

/* ==========================================================================
 * Product Details form — replicates the main bot's rich form layout
 * Each row: label on the left, controls (inputs + segmented unit toggles)
 * on the right. Underline-style inputs in brand red.
 * ========================================================================== */
.exbot-form-stacked {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto 30px;
}
.exbot-field-row {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 32px;
    align-items: center;
}
.exbot-field-row-stacked {
    grid-template-columns: 1fr;
    gap: 8px;
}
.exbot-field-label {
    font-family: 'Hanken Grotesk', inherit !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    color: var(--exbot-ink) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
}
.exbot-field-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.exbot-field-input {
    flex: 1;
    min-width: 80px;
    padding: 8px 0 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    color: var(--exbot-ink) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none;
    width: auto;
}
.exbot-field-input-line {
    border-bottom: 1px solid var(--exbot-ink) !important;
}
.exbot-field-input-line::placeholder {
    color: var(--exbot-text-muted) !important;
    opacity: 1;
}
.exbot-field-input-line:focus {
    border-bottom-color: var(--exbot-brand) !important;
}
.exbot-field-sep {
    color: var(--exbot-ink);
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
}
.exbot-field-readonly {
    width: 100%;
    padding: 14px 16px;
    background: #f3f4f6;
    border-radius: 6px;
    color: var(--exbot-text-muted);
    font-size: 16px;
}

/* Paired input (e.g. Value [V]) */
.exbot-paired-input {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 100px;
    border-bottom: 1px solid var(--exbot-ink);
}
.exbot-paired-input .exbot-field-input {
    border-bottom: none !important;
    padding-right: 0 !important;
}
.exbot-paired-suffix {
    color: var(--exbot-brand);
    font-weight: 600;
    font-size: 16px;
    padding: 0 8px;
}

/* Segmented control (W/A, sec/min/hour, mm/inch, °C/°F, etc.) */
.exbot-segmented {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.exbot-segment-btn {
    padding: 10px 18px !important;
    border: 1.5px solid var(--exbot-brand) !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: var(--exbot-brand) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1 !important;
    min-width: 56px;
}
.exbot-segment-btn:hover {
    background: var(--exbot-brand-light) !important;
}
.exbot-segment-btn-selected {
    background: var(--exbot-brand) !important;
    color: #fff !important;
}

/* Connector block — label on left, 3 stacked rows on right */
.exbot-connector-block {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 32px;
    align-items: start;
}
.exbot-connector-label {
    font-family: 'Hanken Grotesk', inherit !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    color: var(--exbot-ink) !important;
    padding-top: 8px;
}
.exbot-connector-rows {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.exbot-connector-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: center;
}
.exbot-connector-row-label {
    font-weight: 500;
    font-size: 16px;
    color: var(--exbot-ink);
}

/* Action row — Skip on left, Go Back / Next Step on right */
.exbot-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.exbot-actions-right {
    display: flex;
    gap: 12px;
}
.exbot-btn-skip {
    padding: 12px 24px !important;
    background: var(--exbot-ink) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
}
.exbot-btn-skip:hover {
    background: #1f2937 !important;
}
.exbot-btn-secondary {
    padding: 12px 24px !important;
    background: transparent !important;
    color: var(--exbot-ink) !important;
    border: 2px solid var(--exbot-border-strong) !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
}
.exbot-btn-secondary:hover {
    border-color: var(--exbot-ink) !important;
    background: var(--exbot-bg-alt) !important;
}
.exbot-btn-primary-flat {
    padding: 12px 28px !important;
    background: var(--exbot-brand) !important;
    color: #fff !important;
    border: 2px solid var(--exbot-brand) !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
}
.exbot-btn-primary-flat:hover {
    background: var(--exbot-brand-dark) !important;
    border-color: var(--exbot-brand-dark) !important;
}

@media (max-width: 768px) {
    .exbot-field-row,
    .exbot-connector-block {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .exbot-connector-row {
        grid-template-columns: 1fr;
    }
    .exbot-segmented {
        flex-wrap: wrap;
    }
}

/* ==========================================================================
 * (Below this line: rest of original styles — diagnostic panel, modals, etc.)
 * ========================================================================== */
.exbot-form { display: flex; flex-direction: column; gap: 16px; }
.exbot-form-group { display: flex; flex-direction: column; gap: 6px; }
.exbot-form-group label {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--exbot-text) !important;
}
.exbot-form-group input,
.exbot-form-group textarea {
    border: 2px solid var(--exbot-border-strong) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    font-size: 18px !important;
    font-family: inherit !important;
    color: var(--exbot-ink) !important;
    background: var(--exbot-bg) !important;
    transition: border-color 0.2s;
    width: 100%;
}
.exbot-form-group input:focus,
.exbot-form-group textarea:focus {
    outline: none !important;
    border-color: var(--exbot-brand) !important;
}
.exbot-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.exbot-form-notice {
    font-size: 13px;
    color: var(--exbot-text-muted);
    font-style: italic;
    margin: 12px 0 0 !important;
    padding: 10px 14px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
}

/* Consent checkbox */
.exbot-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--exbot-bg-alt);
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--exbot-text);
    line-height: 1.4;
}
.exbot-consent input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }

/* Card preview after scan */
.exbot-card-preview {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #065f46;
    font-size: 15px;
}
.exbot-card-filename { font-size: 12px; opacity: 0.7; }

/* Direct contacts list */
.exbot-direct-contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.exbot-contact-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--exbot-bg);
    border: 2px solid var(--exbot-border-strong);
    border-radius: var(--exbot-radius);
    padding: 14px 16px;
    color: var(--exbot-text) !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}
.exbot-contact-card:hover {
    border-color: var(--exbot-brand);
    background: var(--exbot-brand-light);
    color: var(--exbot-brand-dark) !important;
}
.exbot-contact-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ==========================================================================
 * Business Card Scanner area
 * ========================================================================== */
.exbot-scan-area { margin-bottom: 24px; text-align: center; }
.exbot-scan-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--exbot-brand), var(--exbot-brand-dark)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--exbot-radius-lg) !important;
    padding: 28px 24px !important;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit !important;
    box-shadow: 0 4px 0 var(--exbot-brand-dark), var(--exbot-shadow-lg);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    min-height: 140px;
}
.exbot-scan-btn:hover { transform: translateY(-2px); }
.exbot-scan-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    /* Make SVG white */
    filter: brightness(0) invert(1);
}
.exbot-scan-text { font-size: 22px; font-weight: 800; letter-spacing: 0.04em; }
.exbot-scan-hint { font-size: 14px; opacity: 0.85; }

/* Inline SVG icon used inside primary buttons (Capture button etc.) */
.exbot-btn-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin-right: 4px;
}

.exbot-divider {
    text-align: center;
    margin: 28px 0;
    position: relative;
    color: var(--exbot-text-muted);
}
.exbot-divider::before, .exbot-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--exbot-border-strong);
}
.exbot-divider::before { left: 0; }
.exbot-divider::after  { right: 0; }
.exbot-divider span {
    background: var(--exbot-bg);
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
}

/* ==========================================================================
 * Modals (PDF viewer + scanner)
 * ========================================================================== */
.exbot-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: exbot-fade-in 0.2s ease;
}
@keyframes exbot-fade-in { from { opacity: 0; } to { opacity: 1; } }
body.exbot-modal-open { overflow: hidden; }

.exbot-modal-dialog,
.exbot-scanner-dialog {
    background: var(--exbot-bg);
    border-radius: var(--exbot-radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.exbot-scanner-dialog { max-width: 700px; }

.exbot-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--exbot-border);
    flex-shrink: 0;
}
.exbot-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    flex: 1;
    padding-right: 16px;
}
.exbot-modal-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.exbot-btn-icon-only {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
    font-size: 18px !important;
}
.exbot-modal-iframe { flex: 1; border: 0; width: 100%; min-height: 500px; }

/* Scanner */
.exbot-scanner-body {
    position: relative;
    background: #000;
    overflow: hidden;
}
.exbot-scanner-video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    display: block;
    object-fit: cover;
}
.exbot-scanner-frame {
    position: absolute;
    inset: 8% 6%;
    border: 3px dashed rgba(255,255,255,0.7);
    border-radius: 12px;
    pointer-events: none;
}
.exbot-scanner-status {
    position: absolute;
    bottom: 16px; left: 16px; right: 16px;
    text-align: center;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0;
    font-size: 15px;
}
.exbot-scanner-actions {
    display: flex;
    gap: 12px;
    padding: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Thank-you screen */
.exbot-thanks {
    text-align: center;
    padding: 80px 20px;
}
.exbot-thanks-icon {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: var(--exbot-success);
    color: #fff;
    font-size: 64px;
    line-height: 100px;
    margin: 0 auto 24px;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3);
}
.exbot-thanks-img {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    display: block;
}
.exbot-thanks h1 {
    font-size: 48px !important;
    font-weight: 700 !important;
    margin: 0 0 16px !important;
}
.exbot-thanks-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* ==========================================================================
 * Diagnostic panel (only shown on configuration error)
 * ========================================================================== */
.exbot-diag {
    max-width: 700px;
    margin: 60px auto 0;
    padding: 20px 24px;
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: 12px;
    text-align: left;
    color: #7f1d1d;
}
.exbot-diag h4 {
    margin: 0 0 12px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #7f1d1d !important;
}
.exbot-diag a { color: #b91c1c !important; font-weight: 600 !important; }
.exbot-diag-code {
    display: block;
    padding: 12px;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    margin: 10px 0;
    word-break: break-all;
}
.exbot-diag p { margin: 8px 0 !important; font-size: 14px !important; }

/* ==========================================================================
 * Responsive
 * ========================================================================== */
@media (max-width: 1024px) {
    .exbot-app { padding: 24px 18px 50px; }
    .exbot-header h1, .exbot-header h2 { font-size: 32px !important; }
    .exbot-welcome h1 { font-size: 44px !important; }
    .exbot-tech-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .exbot-app { padding: 16px 12px 40px; }
    .exbot-back-btn { position: static; margin-bottom: 16px; display: inline-block; }
    .exbot-header { text-align: left; }
    .exbot-header h1, .exbot-header h2 { font-size: 26px !important; }
    .exbot-welcome h1 { font-size: 36px !important; }
    .exbot-welcome .exbot-subtitle { font-size: 18px !important; }
    .exbot-shelf-row-4, .exbot-shelf-row-3 { grid-template-columns: repeat(2, 1fr); }
    .exbot-tech-grid { grid-template-columns: 1fr; }
    .exbot-product-card { min-height: 240px; }
    .exbot-tech-cell { min-height: 140px; }
    .exbot-step-title { font-size: 24px !important; }
    .exbot-btn-xl { padding: 20px 32px !important; font-size: 20px !important; }
    .exbot-modal-dialog, .exbot-scanner-dialog { max-height: 100vh; border-radius: 0; }
}

