/**
 * Shared theme tokens and base font for Madad Ticket System
 */

@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@400;700;800&display=swap');

/* Base font setup applied broadly */
body,
.madad-admin,
.madad-admin-wrap,
.madad-client-dashboard,
.madad-ticket-form-container {
  font-family: 'Almarai', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* Light theme tokens (admin + frontend alignment) */
:root[data-theme="light"],
:root {
  /* Admin tokens */
  --md-card-bg: #ffffff;
  --md-border: #e5e7eb;
  --md-text: #111111;
  --md-muted: #6b7280;
  --md-primary: #111111;
  --md-primary-contrast: #ffffff;
  --md-warning: #f59e0b;
  --md-danger: #ef4444;
  --md-radius: 10px;

  /* Frontend tokens */
  --color-primary: #111111;
  --color-primary-700: #1f2937;
  --color-elevated: #ffffff;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #111111;
  --radius-sm: 8px;
  --radius-md: 10px;
  --shadow-sm: none;
  --shadow-md: none;
}

/* Dark theme tokens */
:root[data-theme="dark"] {
  --md-card-bg: #111827;
  --md-border: #1f2937;
  --md-text: #f3f4f6;
  --md-muted: #9ca3af;
  --md-primary: #f3f4f6;
  --md-primary-contrast: #111827;
  --md-warning: #f59e0b;
  --md-danger: #ef4444;
  --md-radius: 10px;

  --color-primary: #f3f4f6;
  --color-primary-700: #e5e7eb;
  --color-elevated: #1f2937;
  --color-surface: #111827;
  --color-border: #374151;
  --color-text: #f3f4f6;
  --radius-sm: 8px;
  --radius-md: 10px;
  --shadow-sm: none;
  --shadow-md: none;
}

/* Ensure buttons never underline across contexts */
.madad-btn,
.madad-btn:hover,
.madad-btn:focus,
.madad-btn:active { text-decoration: none; }

/* Notifications Dropdown (shared) */
.madad-notifications { position: relative; }
.madad-btn.is-icon { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.madad-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 1000;
}
.madad-dropdown-header { padding: 10px 14px; border-bottom: 1px solid var(--color-border); font-weight: 700; }
.madad-dropdown-list { max-height: 300px; overflow: auto; }
.madad-dropdown-item { padding: 10px 14px; border-bottom: 1px solid var(--color-border); }
.madad-dropdown-item:last-child { border-bottom: 0; }
.madad-dropdown-item.unread { background: var(--md-muted, #f9fafb); }
.madad-dropdown-item .title { font-weight: 700; margin-bottom: 4px; }
.madad-dropdown-item .meta { font-size: 12px; color: var(--md-muted); }
.madad-dropdown-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--color-border); }