/* ============================================================
   plugin-ui.css — styling for the companion plugins' Bootstrap-based
   front-end widgets (support-ticket modal, confirmations, etc.).

   We deliberately do NOT load Bootstrap's global CSS (it would collide
   with our bespoke .row/.badge/typography). Instead we style ONLY the
   Bootstrap component classes the plugins emit, using our design tokens.
   Bootstrap's JS bundle still drives the behavior (show/hide/backdrop).

   IMPORTANT: only target classes our own design does NOT use:
   .modal*, bare .btn (+ compound .btn.btn-*), .btn-close, .form-control,
   and a few utilities. We never style bare .btn-primary / .row / .badge
   (those belong to the theme design).
   ============================================================ */

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 1055;
  display: none; width: 100%; height: 100%;
  overflow-x: hidden; overflow-y: auto; outline: 0;
}
.modal-dialog {
  position: relative; width: auto; margin: 1.75rem auto;
  max-width: 520px; pointer-events: none;
}
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 3.5rem); }
.modal-lg { max-width: 820px; }
.modal-content {
  position: relative; display: flex; flex-direction: column; width: 100%;
  pointer-events: auto; background: var(--bg-elev); color: var(--ink);
  border: 0.5px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 0.5px solid var(--line);
}
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0; color: var(--ink); }
.modal-body { padding: 20px 22px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding: 16px 22px; border-top: 0.5px solid var(--line); flex-wrap: wrap;
}
.modal-backdrop { position: fixed; inset: 0; z-index: 1050; width: 100vw; height: 100vh; background: #000; }
.modal-backdrop.fade { opacity: 0; transition: opacity 0.15s linear; }
.modal-backdrop.show { opacity: 0.5; }
.modal.fade .modal-dialog { transition: transform 0.2s ease-out, opacity 0.2s; transform: translateY(-14px); opacity: 0; }
.modal.show .modal-dialog { transform: none; opacity: 1; }
body.modal-open { overflow: hidden; }

/* ── Buttons (plugin widgets use bare .btn + variants) ──────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  padding: 9px 16px; border-radius: 10px; border: 0.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: 0.15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.btn-primary:hover { filter: brightness(0.95); color: #fff; }
.btn.btn-secondary { background: var(--bg-sunk); color: var(--ink); }
.btn.btn-danger { background: var(--err, #e0436e); color: #fff; }
.btn.btn-danger:hover { filter: brightness(0.95); color: #fff; }
.btn.btn-outline-secondary { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.btn-outline-secondary:hover { background: var(--bg-sunk); color: var(--ink); }
.btn-close {
  width: 32px; height: 32px; border-radius: 8px; border: 0; padding: 0;
  background: var(--bg-sunk); color: var(--ink-2); cursor: pointer; font-size: 0; position: relative; flex: 0 0 auto;
}
.btn-close::before { content: "\00d7"; font-size: 20px; line-height: 1; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.btn-close:hover { background: var(--line); color: var(--ink); }

/* ── Floating support button (cc-ticket-floating-btn) ───────────────────── */
.cc-ticket-floating-btn {
  position: fixed; inset-inline-end: 22px; inset-block-end: 22px; z-index: 1040;
  border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ── Form controls inside plugin widgets ────────────────────────────────── */
.modal .form-control, .modal .form-select, .modal textarea, .modal input[type="text"], .modal input[type="email"] {
  width: 100%; padding: 9px 12px; border: 0.5px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font-family: inherit; font-size: 14px;
}
.modal .form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }

/* ── Minimal Bootstrap utilities the widgets rely on ────────────────────── */
.d-none { display: none !important; }
.text-muted { color: var(--ink-3) !important; }
.small { font-size: 86%; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.w-100 { width: 100% !important; }
