/* ═══════════════════════════════════════════════════
   ECI Check-In Form Styles
   ═══════════════════════════════════════════════════ */

:root {
    --eci-brand:    #4F46E5;
    --eci-bg:       #f8f9ff;
    --eci-card:     #ffffff;
    --eci-text:     #1f2937;
    --eci-muted:    #6b7280;
    --eci-border:   #e5e7eb;
    --eci-radius:   12px;
    --eci-shadow:   0 4px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

body {
    background: var(--eci-bg) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hide Divi elements on check-in/wallboard pages */
.eci-checkin-wrap .et_pb_section,
.eci-checkin-wrap .et_pb_row {
    padding: 0 !important;
    margin: 0 !important;
}

.eci-checkin-wrap {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--eci-bg);
}

/* ── Header ─────────────────────────────────────── */
.eci-checkin-header {
    background: var(--eci-brand);
    color: #fff;
    padding: 32px 24px 28px;
    text-align: center;
}

.eci-header-logo {
    max-height: 60px;
    max-width: 180px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

.eci-event-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
    line-height: 1.3;
}

.eci-event-location {
    font-size: 14px;
    opacity: 0.85;
    margin: 4px 0;
}

.eci-event-desc {
    font-size: 13px;
    opacity: 0.75;
    margin: 8px 0 0;
}

/* ── Body / Form ─────────────────────────────────── */
.eci-checkin-body {
    padding: 24px 20px;
}

.eci-field {
    margin-bottom: 16px;
}

.eci-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--eci-text);
    margin-bottom: 6px;
}

.eci-field input,
.eci-field select,
.eci-field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--eci-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--eci-text);
    background: var(--eci-card);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.eci-field input:focus,
.eci-field select:focus {
    outline: none;
    border-color: var(--eci-brand);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.eci-field-group.eci-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.req { color: #ef4444; }

/* ── Consent ─────────────────────────────────────── */
.eci-consent {
    background: #f0f4ff;
    border: 1.5px solid #c7d2fe;
    border-radius: 8px;
    padding: 14px;
}

.eci-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    font-weight: 400 !important;
}

.eci-consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--eci-brand);
}

/* ── Submit Button ───────────────────────────────── */
.eci-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--eci-brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.eci-submit-btn:hover  { opacity: 0.92; }
.eci-submit-btn:active { transform: scale(0.99); }
.eci-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Alerts ──────────────────────────────────────── */
.eci-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.eci-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

/* ── Success State ───────────────────────────────── */
.eci-success-card {
    text-align: center;
    padding: 40px 20px;
}

.eci-success-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--eci-brand);
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.eci-success-card h2 {
    font-size: 24px;
    color: var(--eci-text);
    margin: 0 0 10px;
}

.eci-success-card p {
    color: var(--eci-muted);
    font-size: 15px;
}

/* ── Footer ──────────────────────────────────────── */
.eci-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--eci-muted);
}

/* ── Error State ─────────────────────────────────── */
.eci-error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.eci-error-state .eci-card {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: var(--eci-radius);
    box-shadow: var(--eci-shadow);
}

.eci-icon { font-size: 48px; margin-bottom: 16px; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 480px) {
    .eci-field-group.eci-two-col {
        grid-template-columns: 1fr;
    }
    .eci-checkin-body { padding: 20px 16px; }
}

/* ── Logo Upload Widget ─────────────────────────────── */
.eci-logo-field { margin-top: 4px; }

/* Preview row: circle + remove button */
.eci-logo-preview-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.eci-logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--eci-brand, #4F46E5);
    background: #f9fafb;
    overflow: hidden;
    flex-shrink: 0;
}

.eci-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 4px;
}

.eci-logo-remove-btn {
    background: none;
    border: 1px solid #fecaca;
    color: #ef4444;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

/* Plain styled file input — works on all devices without any tricks */
.eci-logo-file-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--eci-brand, #4F46E5);
    border-radius: 10px;
    font-size: 15px;
    background: #f5f3ff;
    color: #374151;
    cursor: pointer;
    box-sizing: border-box;
}

.eci-logo-file-input::-webkit-file-upload-button {
    background: var(--eci-brand, #4F46E5);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
}

.eci-logo-file-input::file-selector-button {
    background: var(--eci-brand, #4F46E5);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
}

/* Status message */
.eci-logo-status {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    min-height: 20px;
}
.eci-logo-status.success { color: #10b981; font-weight: 600; }
.eci-logo-status.error   { color: #ef4444; }

/* ── Autocomplete Dropdown ───────────────────────────── */
.eci-autocomplete-dropdown {
    position: absolute;
    background: #fff;
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow: hidden;
    display: none;
}

.eci-autocomplete-item {
    padding: 11px 14px;
    font-size: 14px;
    cursor: pointer;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s;
}

.eci-autocomplete-item:last-child { border-bottom: none; }
.eci-autocomplete-item:hover { background: #eef2ff; color: #4F46E5; }

/* Autofill confirmation message */
.eci-autofill-msg {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    color: #15803d;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* ── Marketing Consent Box 2 ─────────────────────── */
.eci-consent-marketing {
    margin-top: 8px;
    padding: 12px 14px;
    background: rgba(0,128,128,0.05);
    border: 1px solid rgba(0,128,128,0.15);
    border-radius: 8px;
}

.eci-consent-optional {
    font-size: 11px;
    color: #9ca3af;
    margin: 4px 0 0 28px;
    font-style: italic;
}
