/**
 * Light theme overrides for Private Line web app pages.
 * Dark is the default (no data-theme attribute).
 */

html[data-theme="light"] body {
  background-color: #f9fafb !important;
  color: #111827 !important;
}

html[data-theme="light"] .card {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

html[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #111827 0%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Backgrounds */
html[data-theme="light"] .bg-black { background-color: #f9fafb !important; }
html[data-theme="light"] .bg-gray-950 { background-color: #f3f4f6 !important; }
html[data-theme="light"] .bg-gray-900 { background-color: #ffffff !important; }
html[data-theme="light"] .bg-gray-800 { background-color: #f3f4f6 !important; }
html[data-theme="light"] .bg-gray-700 { background-color: #e5e7eb !important; }

html[data-theme="light"] .bg-black\/80,
html[data-theme="light"] .bg-black\/95,
html[data-theme="light"] header.bg-black\/80,
html[data-theme="light"] .portal-tabbar.bg-black\/80 {
  background-color: rgba(249, 250, 251, 0.92) !important;
}

html[data-theme="light"] .bg-green-900\/40 {
  background-color: rgba(220, 252, 231, 0.9) !important;
}

html[data-theme="light"] .bg-red-900\/40,
html[data-theme="light"] .bg-red-900\/50 {
  background-color: rgba(254, 226, 226, 0.85) !important;
}

html[data-theme="light"] .bg-amber-900\/40,
html[data-theme="light"] .bg-gray-900.border-amber-700\/50 {
  background-color: #fffbeb !important;
}

/* Text */
html[data-theme="light"] .text-white { color: #111827 !important; }
html[data-theme="light"] .text-gray-100 { color: #1f2937 !important; }
html[data-theme="light"] .text-gray-200 { color: #374151 !important; }
html[data-theme="light"] .text-gray-300 { color: #4b5563 !important; }
html[data-theme="light"] .text-gray-400 { color: #6b7280 !important; }
html[data-theme="light"] .text-gray-500 { color: #6b7280 !important; }
html[data-theme="light"] .text-green-200 { color: #166534 !important; }
html[data-theme="light"] .text-green-400 { color: #15803d !important; }
html[data-theme="light"] .text-amber-200 { color: #92400e !important; }
html[data-theme="light"] .text-red-400 { color: #dc2626 !important; }

html[data-theme="light"] .hover\:text-white:hover { color: #111827 !important; }

/* Borders */
html[data-theme="light"] .border-gray-700,
html[data-theme="light"] .border-gray-800 { border-color: #e5e7eb !important; }
html[data-theme="light"] .border-green-700 { border-color: #86efac !important; }
html[data-theme="light"] .border-amber-700\/50 { border-color: #fcd34d !important; }

/* Form controls */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: #111827;
}

html[data-theme="light"] input.bg-gray-900,
html[data-theme="light"] select.bg-gray-900,
html[data-theme="light"] textarea.bg-gray-900,
html[data-theme="light"] input.bg-gray-800,
html[data-theme="light"] select.bg-gray-800,
html[data-theme="light"] textarea.bg-gray-800 {
  background-color: #ffffff !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

html[data-theme="light"] input[readonly],
html[data-theme="light"] input:disabled {
  background-color: #f3f4f6 !important;
  color: #6b7280 !important;
}

/* Hover states */
html[data-theme="light"] .hover\:bg-gray-700:hover { background-color: #e5e7eb !important; }
html[data-theme="light"] .hover\:bg-gray-600:hover { background-color: #d1d5db !important; }
html[data-theme="light"] .hover\:bg-gray-800:hover { background-color: #e5e7eb !important; }

/* Portal tab bar active state */
html[data-theme="light"] .portal-tab-btn.bg-gray-800 {
  background-color: #e5e7eb !important;
  color: #374151 !important;
}

/* Connect / call page components */
html[data-theme="light"] .app-banner {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb) !important;
  border-bottom-color: #d1d5db !important;
}

html[data-theme="light"] #gate-card-element,
html[data-theme="light"] #gate-card-element-payment {
  background: #ffffff !important;
  border-color: #d1d5db !important;
}

/* Messages */
html[data-theme="light"] .message-bubble-received {
  background: #e5e7eb !important;
  color: #111827 !important;
}

html[data-theme="light"] .attachment-btn {
  background: #e5e7eb !important;
  color: #374151 !important;
}

html[data-theme="light"] .attachment-btn:hover {
  background: #d1d5db !important;
}

html[data-theme="light"] .reply-quote {
  border-left-color: rgba(17, 24, 39, 0.25) !important;
}

html[data-theme="light"] .message-bubble-received .reply-quote {
  border-left-color: rgba(17, 24, 39, 0.2) !important;
}

html[data-theme="light"] .js-edit-composer textarea {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

html[data-theme="light"] .js-edit-composer .btn-cancel {
  background: #e5e7eb !important;
  color: #374151 !important;
}

html[data-theme="light"] .js-edit-composer .btn-save {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* Portal booking page builder (inline dark styles) */
html[data-theme="light"] .bpb-workflow {
  background: linear-gradient(145deg, #f9fafb 0%, #ffffff 50%, #f3f4f6 100%) !important;
  border-color: #e5e7eb !important;
}

html[data-theme="light"] .bpb-preview-wrap {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
}

html[data-theme="light"] .bpb-step-dot {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #6b7280 !important;
}

/* Live preview mirrors the published booking page — keep its palette, not portal light theme */
html[data-theme="light"] .bpb-preview-frame {
  color: #f3f4f6 !important;
}

html[data-theme="light"] .bpb-preview-frame .bpb-preview-header {
  background: rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="light"] .bpb-preview-frame .bpb-preview-field {
  background: rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="light"] .bpb-preview-frame .bpb-preview-btn {
  color: #ffffff !important;
}

html[data-theme="light"] .bpb-input {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

html[data-theme="light"] .bpb-input::placeholder {
  color: #9ca3af !important;
}

html[data-theme="light"] .bpb-chip,
html[data-theme="light"] .bpb-vibe {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
}

html[data-theme="light"] .bpb-chip:hover,
html[data-theme="light"] .bpb-vibe:hover {
  border-color: #9ca3af !important;
  color: #111827 !important;
}

html[data-theme="light"] .bpb-chip.selected,
html[data-theme="light"] .bpb-vibe.selected {
  border-color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.08) !important;
  color: #b91c1c !important;
}

/* Modals keep a dark scrim for contrast */
html[data-theme="light"] .fixed.inset-0.bg-black,
html[data-theme="light"] .fixed.inset-0.bg-black.bg-opacity-75 {
  background-color: rgba(17, 24, 39, 0.55) !important;
}
