/* ============================================================
   GAMBOA ABOGADOS — Custom Theme
   Professional law firm documentation styling
   ============================================================ */

/* --- Color Scheme --- */
[data-md-color-scheme="gamboa"] {
  --md-primary-fg-color: #1a1a2e;
  --md-primary-fg-color--light: #2d2d4e;
  --md-primary-fg-color--dark: #0f0f1a;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #6b4c3b;
  --md-accent-fg-color--transparent: rgba(107, 76, 59, 0.1);

  /* Typography colors */
  --md-default-fg-color: #1a1a2e;
  --md-default-fg-color--light: #4a4a5a;
  --md-default-fg-color--lighter: #8a8578;
  --md-default-fg-color--lightest: #d4cfc5;

  /* Surface colors */
  --md-default-bg-color: #faf9f6;
  --md-default-bg-color--light: #f4f1eb;
  --md-default-bg-color--lighter: #ffffff;
  --md-default-bg-color--lightest: #ffffff;

  /* Code */
  --md-code-bg-color: #f4f1eb;
  --md-code-fg-color: #1a1a2e;

  /* Footer */
  --md-footer-bg-color: #1a1a2e;
  --md-footer-bg-color--dark: #0f0f1a;
  --md-footer-fg-color: #d4cfc5;
  --md-footer-fg-color--light: #8a8578;
  --md-footer-fg-color--lighter: #4a4a5a;
}

/* --- Header --- */
.md-header {
  background-color: #1a1a2e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.md-header__title {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- Sidebar --- */
.md-sidebar {
  border-right: 1px solid #e8e4dc;
}

.md-nav__title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.65rem;
  color: #8a8578;
}

.md-nav__link {
  font-size: 0.82rem;
}

.md-nav__link--active {
  color: #6b4c3b !important;
  font-weight: 600;
}

/* --- Content --- */
.md-content {
  max-width: 52rem;
}

.md-typeset h1 {
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 2px solid #e8e4dc;
  padding-bottom: 0.4em;
  margin-bottom: 1em;
}

.md-typeset h2 {
  font-weight: 600;
  color: #1a1a2e;
  border-bottom: 1px solid #f0ece4;
  padding-bottom: 0.3em;
  margin-top: 2em;
}

.md-typeset h3 {
  font-weight: 600;
  color: #6b4c3b;
  margin-top: 1.6em;
}

/* --- Admonitions (used heavily in SOPs) --- */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Custom admonition: Procedimiento */
.md-typeset .admonition.procedimiento,
.md-typeset details.procedimiento {
  border-color: #6b4c3b;
}
.md-typeset .procedimiento > .admonition-title,
.md-typeset .procedimiento > summary {
  background-color: rgba(107, 76, 59, 0.1);
}
.md-typeset .procedimiento > .admonition-title::before,
.md-typeset .procedimiento > summary::before {
  background-color: #6b4c3b;
}

/* --- Tables (SOPs use lots of tables) --- */
.md-typeset table:not([class]) {
  font-size: 0.82rem;
  border: 1px solid #e8e4dc;
  border-radius: 6px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background-color: #f4f1eb;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #4a4a5a;
  border-bottom: 2px solid #d4cfc5;
}

.md-typeset table:not([class]) td {
  border-bottom: 1px solid #f0ece4;
}

.md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

/* --- Task lists (checklists in SOPs) --- */
.md-typeset .task-list-indicator::before {
  background-color: #6b4c3b;
}

/* --- Tags --- */
.md-typeset .md-tag {
  background-color: #f4f1eb;
  color: #6b4c3b;
  border: 1px solid #e8e4dc;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- Confidential Footer --- */
.confidential-footer {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4cfc5;
}

/* --- SOP metadata block --- */
.sop-meta {
  background: #f4f1eb;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  padding: 1rem 1.4rem;
  margin-bottom: 2rem;
  font-size: 0.82rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem 2rem;
}

.sop-meta dt {
  font-weight: 600;
  color: #8a8578;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.1rem;
}

.sop-meta dd {
  margin: 0 0 0.4rem 0;
  color: #1a1a2e;
}

/* --- Status badges --- */
.status-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge--vigente {
  background: #d4edda;
  color: #155724;
}

.status-badge--borrador {
  background: #fff3cd;
  color: #856404;
}

.status-badge--revision {
  background: #cce5ff;
  color: #004085;
}

.status-badge--obsoleto {
  background: #f8d7da;
  color: #721c24;
}

/* --- Confidential banner on every page --- */
.confidential-banner {
  background: linear-gradient(135deg, #f4f1eb 0%, #ebe7de 100%);
  border: 1px solid #d4cfc5;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.68rem;
  color: #8a8578;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* --- Search highlight --- */
.md-search-result mark {
  background-color: rgba(107, 76, 59, 0.2);
  color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d4cfc5;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8a8578;
}
