/**
 * Bookings Dashboard styles (Stage C3 — see docs/BOOKING_LAUNCH_PLAN.md)
 */

.bookings-dashboard-modal .bd-modal-content {
  max-width: 720px;
  width: 96%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.bookings-dashboard-modal .bd-body {
  overflow-y: auto;
  padding: 16px 20px;
}

.bookings-dashboard-modal .bd-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
}

/* Tabs */
.bookings-dashboard-modal .bd-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  margin-bottom: 12px;
  padding-bottom: 0;
  overflow-x: auto;
}
.bookings-dashboard-modal .bd-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--text-secondary, #64748b);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.bookings-dashboard-modal .bd-tab:hover {
  color: var(--text-primary, #0f172a);
}
.bookings-dashboard-modal .bd-tab.on {
  color: var(--accent, #3b82f6);
  border-bottom-color: var(--accent, #3b82f6);
  font-weight: 600;
}
.bookings-dashboard-modal .bd-tab-count {
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text-secondary, #64748b);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}
.bookings-dashboard-modal .bd-tab.on .bd-tab-count {
  background: color-mix(in srgb, var(--accent, #3b82f6) 15%, transparent);
  color: var(--accent, #3b82f6);
}

/* List */
.bookings-dashboard-modal .bd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bookings-dashboard-modal .bd-row {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-primary, #fff);
  transition: background 0.15s, border-color 0.15s;
}
.bookings-dashboard-modal .bd-row:hover {
  background: var(--bg-secondary, #f8fafc);
  border-color: var(--border-strong, #cbd5e1);
}
.bookings-dashboard-modal .bd-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bookings-dashboard-modal .bd-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bookings-dashboard-modal .bd-title {
  font-size: 14px;
  color: var(--text-primary, #0f172a);
  word-break: break-word;
}
.bookings-dashboard-modal .bd-duration {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  background: var(--bg-secondary, #f1f5f9);
  padding: 1px 6px;
  border-radius: 4px;
}
.bookings-dashboard-modal .bd-when {
  font-size: 13px;
  color: var(--text-secondary, #475569);
}
.bookings-dashboard-modal .bd-rel {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin-left: 6px;
}
.bookings-dashboard-modal .bd-guest {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary, #475569);
}
.bookings-dashboard-modal .bd-guest i { color: var(--text-muted, #94a3b8); }
.bookings-dashboard-modal .bd-muted {
  color: var(--text-muted, #94a3b8);
  font-weight: 400;
  margin-left: 6px;
}
.bookings-dashboard-modal .bd-note {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  font-style: italic;
}

/* Badge */
.bookings-dashboard-modal .bd-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.bookings-dashboard-modal .bd-badge.on {
  background: color-mix(in srgb, var(--success, #10b981) 14%, transparent);
  color: var(--success, #10b981);
}
.bookings-dashboard-modal .bd-badge.open {
  background: color-mix(in srgb, var(--accent, #3b82f6) 14%, transparent);
  color: var(--accent, #3b82f6);
}
.bookings-dashboard-modal .bd-badge.cancel {
  background: color-mix(in srgb, var(--error, #ef4444) 12%, transparent);
  color: var(--error, #ef4444);
}
.bookings-dashboard-modal .bd-badge.past {
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text-muted, #94a3b8);
}

/* Row actions */
.bookings-dashboard-modal .bd-row-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  flex-shrink: 0;
}
.bookings-dashboard-modal .bd-row-actions .link-button {
  background: none;
  border: none;
  color: var(--accent, #3b82f6);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
}
.bookings-dashboard-modal .bd-row-actions .link-button:hover {
  background: color-mix(in srgb, var(--accent, #3b82f6) 10%, transparent);
}
.bookings-dashboard-modal .bd-row-actions .link-button.danger {
  color: var(--error, #ef4444);
}
.bookings-dashboard-modal .bd-row-actions .link-button.danger:hover {
  background: color-mix(in srgb, var(--error, #ef4444) 10%, transparent);
}

/* Empty/loading/error */
.bookings-dashboard-modal .bd-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
  font-size: 14px;
}
.bookings-dashboard-modal .bd-error {
  padding: 14px 16px;
  background: color-mix(in srgb, var(--error, #ef4444) 10%, transparent);
  color: var(--error, #ef4444);
  border-radius: 8px;
  font-size: 13px;
}

/* Inline edit row — replaces the row body while a link is being renamed.
   Tinted so it reads as "this row is in a different mode" without a modal. */
.bookings-dashboard-modal .bd-row-editing {
  background: color-mix(in srgb, var(--accent, #14b8a6) 6%, transparent);
  border-radius: 8px;
}
.bookings-dashboard-modal .bd-edit-field {
  display: block;
  margin-bottom: 10px;
}
.bookings-dashboard-modal .bd-edit-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748b);
  margin-bottom: 4px;
}
.bookings-dashboard-modal .bd-edit-field input {
  width: 100%;
  max-width: 320px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text-primary, #0f172a);
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-strong, #cbd5e1);
  border-radius: 6px;
}
/* Focus must be visible on its own, not conveyed by border colour alone. */
.bookings-dashboard-modal .bd-edit-field input:focus-visible {
  outline: 2px solid var(--accent, #14b8a6);
  outline-offset: 2px;
}
.bookings-dashboard-modal .bd-edit-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary, #64748b);
}

/* Mobile */
@media (max-width: 600px) {
  .bookings-dashboard-modal .bd-row {
    flex-direction: column;
    gap: 8px;
  }
  .bookings-dashboard-modal .bd-edit-field input {
    max-width: none;
  }
  .bookings-dashboard-modal .bd-row-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }
}
