/* ==========================================================================
   TZ39 — High-Contrast Content Pages (/legal/ & /blog/) + 2-Column Contracts
   + Non-Overlapping Cookie Banner + Crisp RU | ES | EN Switcher
   ========================================================================== */

/* 1. Light Theme High Contrast (#0B1220 primary / #334155 secondary / #94A3B8 borders) */
html[data-theme="light"] body,
body.theme-light {
  background: #F3F6FA !important;
  color: #0B1220 !important;
}

html[data-theme="light"] .app-header,
body.theme-light .app-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #94A3B8 !important;
  box-shadow: 0 1px 4px rgba(11, 18, 32, 0.06) !important;
}

html[data-theme="light"] .logo-title,
body.theme-light .logo-title {
  color: #0B1220 !important;
}

html[data-theme="light"] .logo-subtitle,
body.theme-light .logo-subtitle {
  color: #334155 !important;
}

/* Crisp Language Switcher (Light & Dark) */
.lang-switcher {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 3px !important;
  border-radius: 10px !important;
  background: #E8EEF5 !important;
  border: 1px solid #94A3B8 !important;
}

html[data-theme="dark"] .lang-switcher {
  background: #182942 !important;
  border-color: #365073 !important;
}

.lang-switcher .lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  height: 30px !important;
  padding: 0 9px !important;
  border-radius: 7px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  color: #0B1220 !important;
  background: transparent !important;
  border: none !important;
}

html[data-theme="dark"] .lang-switcher .lang-btn {
  color: #CBD5E1 !important;
}

html body .lang-switcher .lang-btn.active,
html body.theme-light .lang-switcher .lang-btn.active {
  background: #0284C7 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.35) !important;
}

html body.theme-light .lang-switcher .lang-btn.active .lang-code {
  color: #FFFFFF !important;
}

html[data-theme="dark"] body .lang-switcher .lang-btn.active {
  background: #38BDF8 !important;
  background-image: none !important;
  color: #09111F !important;
}

/* Hero, Cards, Sections, Breadcrumbs, Badges, Sources */
.oe-page-wrap {
  padding-bottom: 110px !important;
}

html[data-theme="light"] .oe-breadcrumbs,
body.theme-light .oe-breadcrumbs {
  color: #334155 !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .oe-breadcrumbs a,
body.theme-light .oe-breadcrumbs a {
  color: #0284C7 !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .oe-hero-card,
html[data-theme="light"] .oe-section-card,
html[data-theme="light"] .oe-index-card,
html[data-theme="light"] .oe-sources-card,
body.theme-light .oe-hero-card,
body.theme-light .oe-section-card,
body.theme-light .oe-index-card,
body.theme-light .oe-sources-card {
  background: #FFFFFF !important;
  border: 1px solid #94A3B8 !important;
  box-shadow: 0 2px 10px rgba(11, 18, 32, 0.05) !important;
  color: #0B1220 !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .oe-faq-q,
html[data-theme="light"] .oe-index-card h3,
html[data-theme="light"] .oe-section-card h2,
html[data-theme="light"] .oe-sources-card h2,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light .oe-faq-q,
body.theme-light .oe-index-card h3,
body.theme-light .oe-section-card h2,
body.theme-light .oe-sources-card h2 {
  color: #0B1220 !important;
}

html[data-theme="light"] .oe-lead,
html[data-theme="light"] .oe-section-card p,
html[data-theme="light"] .oe-section-card li,
html[data-theme="light"] .oe-index-card p,
html[data-theme="light"] .oe-faq-a,
html[data-theme="light"] .oe-checklist li,
html[data-theme="light"] .oe-short-answer p,
html[data-theme="light"] .oe-tips-box p,
html[data-theme="light"] .oe-tips-box li,
html[data-theme="light"] .oe-sources-card p,
body.theme-light .oe-lead,
body.theme-light .oe-section-card p,
body.theme-light .oe-section-card li,
body.theme-light .oe-index-card p,
body.theme-light .oe-faq-a,
body.theme-light .oe-checklist li,
body.theme-light .oe-short-answer p,
body.theme-light .oe-tips-box p,
body.theme-light .oe-tips-box li,
body.theme-light .oe-sources-card p {
  color: #334155 !important;
}

/* Badges above headings — crisp readable indigo pill */
html[data-theme="light"] .oe-badge,
body.theme-light .oe-badge {
  background: #EEF2FF !important;
  color: #312E81 !important;
  border: 1px solid #818CF8 !important;
  font-weight: 700 !important;
}

/* Short Answer & Tips & Disclaimer boxes */
html[data-theme="light"] .oe-short-answer,
body.theme-light .oe-short-answer {
  background: #ECFDF5 !important;
  border: 1px solid #34D399 !important;
  border-left: 4px solid #059669 !important;
}

html[data-theme="light"] .oe-short-answer-title,
body.theme-light .oe-short-answer-title {
  color: #065F46 !important;
}

html[data-theme="light"] .oe-tips-box,
body.theme-light .oe-tips-box {
  background: #FFFBEB !important;
  border: 1px solid #F59E0B !important;
  border-left: 4px solid #D97706 !important;
}

html[data-theme="light"] .oe-tips-box h3,
body.theme-light .oe-tips-box h3 {
  color: #92400E !important;
}

html[data-theme="light"] .oe-disclaimer-box,
body.theme-light .oe-disclaimer-box {
  background: #F8FAFC !important;
  border: 1px solid #94A3B8 !important;
  border-left: 4px solid #4F46E5 !important;
  color: #0B1220 !important;
}

html[data-theme="light"] .oe-disclaimer-box strong,
body.theme-light .oe-disclaimer-box strong {
  color: #0B1220 !important;
}

/* Source links & domain pills (infoleg.gob.ar, boletinoficial.buenosaires.gob.ar) */
html[data-theme="light"] .oe-sources-card a,
body.theme-light .oe-sources-card a {
  color: #0369A1 !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .oe-sources-card span[style*="monospace"],
body.theme-light .oe-sources-card span[style*="monospace"] {
  background: #E0F2FE !important;
  color: #0C4A6E !important;
  border: 1px solid #38BDF8 !important;
  font-weight: 700 !important;
}

/* Footer high contrast */
html[data-theme="light"] .oe-site-footer,
body.theme-light .oe-site-footer {
  background: #FFFFFF !important;
  border-top: 1px solid #94A3B8 !important;
  color: #334155 !important;
  padding-bottom: 84px !important;
}

html[data-theme="light"] .oe-site-footer div,
html[data-theme="light"] .oe-site-footer a,
body.theme-light .oe-site-footer div,
body.theme-light .oe-site-footer a {
  color: #0B1220 !important;
}

html[data-theme="light"] .oe-site-footer a:hover,
body.theme-light .oe-site-footer a:hover {
  color: #0284C7 !important;
}

/* 2. Two-Column Contract Table (50% ES | 50% Translation) + Mobile Stack */
.oe-compare-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid #94A3B8 !important;
}

html[data-theme="light"] .oe-compare-table th,
body.theme-light .oe-compare-table th {
  background: #E2E8F0 !important;
  color: #0B1220 !important;
  font-weight: 800 !important;
  border-bottom: 2px solid #94A3B8 !important;
  padding: 14px 16px !important;
  width: 50% !important;
}

html[data-theme="light"] .oe-compare-table td,
body.theme-light .oe-compare-table td {
  background: #FFFFFF !important;
  color: #0B1220 !important;
  border-bottom: 1px solid #CBD5E1 !important;
  padding: 14px 16px !important;
  width: 50% !important;
  line-height: 1.6 !important;
}

html[data-theme="light"] .oe-compare-table td:first-child,
body.theme-light .oe-compare-table td:first-child {
  border-right: 1px solid #CBD5E1 !important;
  background: #F8FAFC !important;
}

html[data-theme="light"] .oe-compare-table tr:nth-child(even) td:last-child,
body.theme-light .oe-compare-table tr:nth-child(even) td:last-child {
  background: #FFFFFF !important;
}

html[data-theme="dark"] .oe-compare-table {
  border-color: #365073 !important;
}

html[data-theme="dark"] .oe-compare-table td:first-child {
  border-right: 1px solid #293D58 !important;
}

@media (max-width: 768px) {
  .oe-compare-table,
  .oe-compare-table thead,
  .oe-compare-table tbody,
  .oe-compare-table tr,
  .oe-compare-table th,
  .oe-compare-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .oe-compare-table thead {
    display: none !important;
  }
  .oe-compare-table tr {
    border-bottom: 2px solid #94A3B8 !important;
    margin-bottom: 10px !important;
  }
  .oe-compare-table td:first-child {
    border-right: none !important;
    border-bottom: 1px dashed #94A3B8 !important;
  }
}

/* 3. Non-Overlapping Compact Cookie Banner */
#oeCookieBanner,
.oe-cookie-banner {
  position: fixed !important;
  right: 16px !important;
  bottom: 16px !important;
  left: auto !important;
  transform: none !important;
  max-width: 440px !important;
  width: calc(100vw - 32px) !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  font-size: 0.82rem !important;
  z-index: 950 !important;
  box-shadow: 0 10px 30px rgba(11, 18, 32, 0.25) !important;
}

/* 4. TZ40 — FAQ Internal Links & Next Practical Guide Card */
.oe-faq-a a {
  color: #0284C7 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

html[data-theme="dark"] .oe-faq-a a {
  color: #38BDF8 !important;
}

.tz40-next-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  margin: 28px 0 18px;
  border-radius: 16px;
  text-decoration: none;
  background: linear-gradient(135deg, #EEF2FF 0%, #ECFDF5 100%);
  border: 1px solid #818CF8;
  border-left: 5px solid #4F46E5;
  box-shadow: 0 4px 14px rgba(11, 18, 32, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tz40-next-guide:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(11, 18, 32, 0.12);
}

.tz40-next-eyebrow {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4338CA;
  margin-bottom: 4px;
}

.tz40-next-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0B1220;
  line-height: 1.3;
}

.tz40-next-sub {
  font-size: 0.86rem;
  color: #334155;
  margin-top: 4px;
}

.tz40-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #4F46E5;
  color: #FFFFFF;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

html[data-theme="dark"] .tz40-next-guide {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(16, 185, 129, 0.14));
  border-color: rgba(129, 140, 248, 0.55);
}

html[data-theme="dark"] .tz40-next-eyebrow { color: #A5B4FC; }
html[data-theme="dark"] .tz40-next-title { color: #F8FAFC; }
html[data-theme="dark"] .tz40-next-sub { color: #CBD5E1; }

@media (max-width: 768px) {
  .tz40-next-guide {
    flex-direction: column;
    align-items: flex-start;
  }
}
