/* ============================================================
   DPP Phonetic — small UI styles for the indicator badge
   and the cheat-sheet popup.
   ============================================================ */

.dpp-phon-badge {
  display: none;             /* shown by JS only when a Hindi field is focused */
  align-items: center;
  gap: 4px;
  padding: 0;
  background: var(--paper, #fdf6e3);
  border: 1px solid var(--gold-pale, #c9962b66);
  border-radius: 999px;
  font-family: 'Tiro Devanagari Hindi', serif;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-size: 0.86rem;
  height: 26px;
  line-height: 1;
  padding: 0 4px;
  box-shadow: 0 2px 6px -3px rgba(74, 21, 21, 0.25);
}
.dpp-phon-badge:hover {
  border-color: var(--gold, #c9962b);
}

.dpp-phon-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-weight: 600;
}

.dpp-phon-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  font-family: var(--display, sans-serif);
  font-size: 0.7rem;
  color: var(--ink-mute, #97825a);
  background: transparent;
  border: 1px solid currentColor;
  margin-left: 2px;
  cursor: help;
}
.dpp-phon-help:hover {
  color: var(--maroon, #6B1F1F);
}

.dpp-phon-badge.dpp-phon-on .dpp-phon-glyph {
  color: var(--gold-pale, #f0d68a);
  background: var(--maroon-deep, #4a1515);
}
.dpp-phon-badge.dpp-phon-off .dpp-phon-glyph {
  color: var(--ink-mute, #97825a);
  background: transparent;
}
.dpp-phon-badge.dpp-phon-off {
  opacity: 0.7;
}

/* ============================================================
   Cheat-sheet modal
   ============================================================ */
.dpp-phon-sheet-bg {
  position: fixed;
  inset: 0;
  background: rgba(74, 21, 21, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: dpp-phon-fade 0.2s ease;
}
@keyframes dpp-phon-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dpp-phon-sheet {
  background: var(--paper, #fdf6e3);
  border: 1px solid var(--gold, #c9962b);
  border-radius: 12px;
  padding: 28px 30px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 16px 48px -12px rgba(74, 21, 21, 0.3);
  font-family: var(--body, Lora, serif);
  color: var(--ink, #2a1a0c);
  line-height: 1.5;
}
.dpp-phon-sheet h3 {
  margin: 0 0 8px;
  font-family: var(--display, Cinzel, serif);
  color: var(--maroon-deep, #4a1515);
  font-size: 1.4rem;
}
.dpp-phon-sheet h4 {
  font-family: var(--display, Cinzel, serif);
  color: var(--gold, #c9962b);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.dpp-phon-sheet p {
  margin: 0 0 18px;
  color: var(--ink-soft, #5a4a35);
  font-size: 0.94rem;
}

.dpp-phon-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--gold-pale, #c9962b66);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink-mute, #97825a);
  line-height: 1;
}
.dpp-phon-close:hover {
  color: var(--maroon, #6B1F1F);
  border-color: var(--maroon, #6B1F1F);
}

.dpp-phon-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 18px;
}
.dpp-phon-cols table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.dpp-phon-cols td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--ivory-warm, #f5e9c4);
  vertical-align: top;
}
.dpp-phon-cols td:first-child {
  font-family: ui-monospace, 'Menlo', monospace;
  color: var(--ink-soft, #5a4a35);
  white-space: nowrap;
  font-size: 0.86rem;
}
.dpp-phon-cols td:nth-child(2) {
  font-family: 'Tiro Devanagari Hindi', serif;
  color: var(--maroon-deep, #4a1515);
  font-size: 1.05rem;
}
.dpp-phon-cols td:nth-child(3) {
  font-family: ui-monospace, 'Menlo', monospace;
  color: var(--ink-soft, #5a4a35);
  white-space: nowrap;
  font-size: 0.86rem;
  padding-left: 16px;
  border-left: 1px solid var(--ivory-warm, #f5e9c4);
}
.dpp-phon-cols td:nth-child(4) {
  font-family: 'Tiro Devanagari Hindi', serif;
  color: var(--maroon-deep, #4a1515);
  font-size: 1.05rem;
}

.dpp-phon-tip {
  background: var(--ivory-warm, #f5e9c4);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--ink-soft, #5a4a35);
  margin-bottom: 16px;
}
.dpp-phon-tip kbd {
  background: var(--paper, #fdf6e3);
  border: 1px solid var(--gold-pale, #c9962b66);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: ui-monospace, 'Menlo', monospace;
}

.dpp-phon-try {
  border-top: 1px solid var(--gold-pale, #c9962b66);
  padding-top: 14px;
}
.dpp-phon-try label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display, Cinzel, serif);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #c9962b);
}
.dpp-phon-tryin {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gold-pale, #c9962b66);
  border-radius: 6px;
  font-family: 'Tiro Devanagari Hindi', serif;
  font-size: 1.05rem;
  background: var(--paper, #fdf6e3);
  color: var(--maroon-deep, #4a1515);
}
.dpp-phon-tryin:focus {
  border-color: var(--maroon, #6B1F1F);
  outline: none;
}
