/* Domnick Hunter Tables - HavaSam Project */
/* Prefix: dh- to avoid WordPress theme conflicts */

:root {
  --dh-primary: #c41e3a;
  --dh-primary-dark: #9a1830;
  --dh-secondary: #1a1a2e;
  --dh-accent: #e8e8e8;
  --dh-border: #d0d0d0;
  --dh-header-bg: #1a1a2e;
  --dh-header-text: #ffffff;
  --dh-row-alt: #f7f7f9;
  --dh-row-hover: #fff0f2;
  --dh-text: #222222;
  --dh-muted: #555555;
  --dh-code-bg: #f0f0f0;
  --dh-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Tahoma", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background: #f4f5f7;
  color: var(--dh-text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  direction: rtl;
}

.dh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.dh-header {
  background: linear-gradient(135deg, var(--dh-secondary) 0%, #2d2d44 100%);
  color: #fff;
  padding: 28px 24px;
  border-radius: 10px;
  margin-bottom: 32px;
  box-shadow: var(--dh-shadow);
  text-align: center;
}

.dh-header h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.dh-header p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.dh-header .dh-brand {
  display: inline-block;
  background: var(--dh-primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.dh-section {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--dh-shadow);
  margin-bottom: 28px;
  overflow: hidden;
}

.dh-section-header {
  background: var(--dh-header-bg);
  color: var(--dh-header-text);
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dh-section-header::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--dh-primary);
  border-radius: 2px;
}

.dh-section-body {
  padding: 20px;
}

.dh-note {
  background: #fff8e6;
  border-right: 4px solid #f0ad4e;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: #5a4a2a;
  border-radius: 0 6px 6px 0;
}

.dh-note strong {
  color: #3d3218;
}

.dh-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
}

.dh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 640px;
  direction: rtl;
}

.dh-table th,
.dh-table td {
  padding: 10px 12px;
  text-align: center;
  border: 1px solid var(--dh-border);
  vertical-align: middle;
}

.dh-table thead th {
  background: var(--dh-header-bg);
  color: var(--dh-header-text);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.dh-table thead th.dh-subhead {
  background: #2d2d44;
  font-size: 0.82rem;
  font-weight: 500;
}

.dh-table tbody tr:nth-child(even) {
  background: var(--dh-row-alt);
}

.dh-table tbody tr:hover {
  background: var(--dh-row-hover);
}

.dh-table td.dh-model {
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 600;
  color: var(--dh-primary-dark);
  text-align: right;
  direction: ltr;
  white-space: nowrap;
}

.dh-table td.dh-num,
.dh-table th.dh-num {
  font-family: "Consolas", "Courier New", monospace;
  direction: ltr;
  text-align: center;
}

.dh-table .dh-unit {
  font-size: 0.78rem;
  color: var(--dh-muted);
  font-weight: 400;
}

.dh-table .dh-highlight {
  background: #fff0f2 !important;
  font-weight: 600;
}

.dh-caption {
  font-size: 0.85rem;
  color: var(--dh-muted);
  margin: 12px 0 0;
  line-height: 1.5;
}

.dh-caption code {
  background: var(--dh-code-bg);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.84rem;
  direction: ltr;
  display: inline-block;
}

.dh-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  color: var(--dh-muted);
  border-top: 1px solid var(--dh-border);
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .dh-container {
    padding: 16px 10px 32px;
  }

  .dh-header h1 {
    font-size: 1.25rem;
  }

  .dh-section-body {
    padding: 14px;
  }

  .dh-table {
    font-size: 0.8rem;
  }

  .dh-table th,
  .dh-table td {
    padding: 8px 8px;
  }
}

/* Print-friendly */
@media print {
  body {
    background: #fff;
  }

  .dh-section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .dh-table-wrapper {
    overflow: visible;
  }
}
