/**
 * Booth Box — Theme Mode
 * Minimal structural styles. Inherits fonts, colors, and button styles
 * from the active WordPress theme.
 */

/* Component wrapper */
.boothbox-component {
    max-width: 720px;
    margin: 0 auto 2em;
}

/* Header */
.boothbox-header-visible {
    text-align: center;
    margin-bottom: 1.5em;
}
.boothbox-logo {
    display: block;
    max-height: 64px;
    width: auto;
    margin: 0 auto 0.5em;
}
.boothbox-market-name {
    margin: 0 0 0.25em;
}
.boothbox-market-desc {
    opacity: 0.7;
    margin: 0;
}

/* Loading */
.boothbox-loading {
    text-align: center;
    padding: 2em;
    opacity: 0.6;
}

/* Notice */
.boothbox-notice {
    padding: 1em;
    border-radius: 6px;
    margin-bottom: 1em;
}
.boothbox-notice-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

/* Form fields */
.boothbox-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.boothbox-form-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}
.boothbox-field {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    width: 100%;
}
.boothbox-field-half {
    width: calc(50% - 0.5em);
}
@media (max-width: 600px) {
    .boothbox-field-half { width: 100%; }
}
.boothbox-field label {
    font-weight: 600;
    font-size: 0.9em;
}
.boothbox-field input,
.boothbox-field select,
.boothbox-field textarea {
    width: 100%;
    padding: 0.6em 0.75em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
}
.boothbox-field textarea {
    resize: vertical;
}
.boothbox-form-heading {
    width: 100%;
    margin: 0.5em 0 0;
}
.boothbox-form-para {
    width: 100%;
    opacity: 0.7;
    margin: 0;
}
.boothbox-divider {
    width: 100%;
    border: none;
    border-top: 1px solid #ddd;
    margin: 0.5em 0;
}

/* Buttons */
.boothbox-btn {
    display: inline-block;
    padding: 0.7em 1.5em;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s;
    font-family: inherit;
}
.boothbox-btn:hover { opacity: 0.85; }
.boothbox-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.boothbox-btn-primary {
    background: var(--wp--preset--color--primary, #0073aa);
    color: #fff;
}
.boothbox-btn-sm {
    padding: 0.4em 1em;
    font-size: 0.85em;
}
.boothbox-btn-full { width: 100%; }
.boothbox-form-actions {
    width: 100%;
}

/* Messages */
.boothbox-message {
    padding: 0.75em 1em;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 0.5em;
    width: 100%;
}
.boothbox-msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.boothbox-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Success state */
.boothbox-success,
.boothbox-login-success {
    text-align: center;
    padding: 2em;
}
.boothbox-success-icon {
    font-size: 2.5em;
    color: #16a34a;
    margin-bottom: 0.25em;
}

/* Event cards */
.boothbox-event-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.75em;
    gap: 1em;
}
@media (max-width: 600px) {
    .boothbox-event-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
.boothbox-event-info { flex: 1; min-width: 0; }
.boothbox-event-title { margin: 0 0 0.25em; font-size: 1.1em; }
.boothbox-event-meta { font-size: 0.85em; opacity: 0.7; }
.boothbox-event-notes { font-size: 0.85em; opacity: 0.6; margin: 0.25em 0 0; }

/* Signup modal */
.boothbox-signup-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
}
.boothbox-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 2em;
    max-width: 400px;
    width: 100%;
    position: relative;
}
.boothbox-modal-close {
    position: absolute;
    top: 0.5em;
    right: 0.75em;
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    line-height: 1;
}
.boothbox-signup-title {
    margin: 0 0 1em;
}

/* Login card */
.boothbox-login-card {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 2em;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.boothbox-login-icon {
    margin-bottom: 1em;
    color: var(--wp--preset--color--primary, #0073aa);
}
.boothbox-login-icon svg {
    width: 40px;
    height: 40px;
}
.boothbox-login-card h3 {
    margin: 0 0 0.25em;
}
.boothbox-login-card > p {
    opacity: 0.6;
    margin: 0 0 1.5em;
}
.boothbox-powered {
    margin-top: 1.5em;
    font-size: 0.75em;
    opacity: 0.4;
}

/* v2.1.0 — Vendor Type Selection & Location Picker */
.boothbox-type-selection { margin: 1em 0; }
.boothbox-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; margin-top: 1em; }
@media (max-width: 480px) { .boothbox-type-grid { grid-template-columns: 1fr; } }
.boothbox-type-card { border: 2px solid #e2e8f0; border-radius: 10px; padding: 1.5em; text-align: center; cursor: pointer; transition: all 0.2s; }
.boothbox-type-card:hover { border-color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,0.1); }
.boothbox-type-card h4 { margin: 0.5em 0 0.25em; font-size: 1.1em; }
.boothbox-type-card p { margin: 0; font-size: 0.85em; color: #64748b; }
.boothbox-type-icon { font-size: 2em; margin-bottom: 0.25em; }
.boothbox-card-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.boothbox-badge { display: inline-block; font-size: 0.75em; padding: 0.2em 0.6em; border-radius: 20px; background: #eff6ff; color: #2563eb; margin-top: 0.5em; }
.boothbox-location-picker { margin: 1em 0; }
.boothbox-ack-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.5; }
.boothbox-ack-label input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.boothbox-checkbox-group { display: flex; flex-direction: column; gap: 0.5em; }
.boothbox-checkbox-horizontal { flex-direction: row; flex-wrap: wrap; gap: 1em; }
.boothbox-checkbox-label { display: flex; align-items: center; gap: 0.5em; cursor: pointer; }

/* v2.3.0 — Card Grid */
.boothbox-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75em; }
@media (max-width: 480px) { .boothbox-card-grid { grid-template-columns: 1fr; } }
.boothbox-card-item { border: 2px solid #e2e8f0; border-radius: 8px; padding: 0.75em; cursor: pointer; transition: all 0.2s; text-align: center; }
.boothbox-card-item:hover { border-color: #93c5fd; }
.boothbox-card-selected { border-color: #0a1628 !important; background: #f0f4ff; }
.boothbox-card-img-wrap { background: #f8f9fb; border-radius: 6px; margin-bottom: 0.5em; border-bottom: 1px solid #e5e7eb; padding: 0.25em; }
.boothbox-card-img-wrap img { width: 100%; height: 8em; object-fit: contain; border-radius: 4px; }
.boothbox-card-label { margin: 0; font-weight: 600; font-size: 0.9em; }
.boothbox-card-desc { margin: 0.25em 0 0; font-size: 0.8em; opacity: 0.6; }

/* v2.3.0 — Radio */
.boothbox-radio-group { display: flex; flex-direction: column; gap: 0.5em; }
.boothbox-radio-group.boothbox-radio-horizontal { flex-direction: row; flex-wrap: wrap; gap: 1em; }
.boothbox-radio-label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 2px; white-space: nowrap; }
.boothbox-radio-label input[type="radio"] { width: 16px; height: 16px; flex-shrink: 0; margin: 0; cursor: pointer; }
.boothbox-radio-label span { display: inline; line-height: 1.4; }

/* v2.3.0 — Other input */
.boothbox-other-input { margin-top: 0.5em; }

/* v2.3.0 — Character counter */
.boothbox-char-counter { font-size: 0.75em; opacity: 0.5; margin-top: 0.25em; }
.boothbox-char-warn { color: #dc2626; opacity: 1; }

/* v2.3.0 — Field errors */
.boothbox-field-error { font-size: 0.8em; color: #dc2626; margin-top: 0.25em; }

/* v2.3.0 — Multi-step progress */
.boothbox-step-progress { width: 100%; margin-bottom: 1.5em; }
.boothbox-step-label { display: flex; justify-content: space-between; font-size: 0.85em; margin-bottom: 0.5em; }
.boothbox-step-label span:first-child { font-weight: 600; }
.boothbox-step-label span:last-child { opacity: 0.5; }
.boothbox-step-bar { display: flex; gap: 4px; }
.boothbox-step-seg { flex: 1; height: 6px; border-radius: 3px; background: #e2e8f0; }
.boothbox-step-active { background: #0a1628; }
.boothbox-step-nav { display: flex; gap: 0.75em; width: 100%; margin-top: 1em; }
.boothbox-btn-back { flex: 1; background: #f1f5f9; color: #334155; }
.boothbox-btn-next { flex: 1; background: #0a1628; color: #fff; }
