/* Rahgiri (gold hallmark inquiry): the page card, the result overlay and the API panel. No inline styles (CSP). */
.rg-card { position: relative; max-width: 640px; margin: 0 auto; padding: 34px 30px 26px; border-radius: 22px; background: linear-gradient(160deg, rgba(212, 166, 52, 0.12), rgba(18, 15, 10, 0.92) 55%); border: 1px solid rgba(212, 166, 52, 0.35); box-shadow: 0 30px 80px -30px rgba(212, 166, 52, 0.35); }
.rg-seal { position: absolute; inset-block-start: -26px; inset-inline-start: 50%; transform: translateX(-50%); width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #f7dc8d, #b8861e); color: #1a1407; box-shadow: 0 10px 30px rgba(212, 166, 52, 0.5); }
[dir="rtl"] .rg-seal { transform: translateX(50%); }
.rg-seal .icon { width: 28px; height: 28px; }
.rg-label { display: block; margin-bottom: 8px; font-weight: 700; }
.rg-row { display: flex; gap: 10px; }
.rg-input { flex: 1; font-size: 1.15rem; letter-spacing: 0.08em; text-align: center; }
.rg-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.rg-btn .icon { width: 18px; height: 18px; }
.rg-btn[disabled] { opacity: 0.6; cursor: progress; }
.rg-err { margin: 10px 0 0; color: #ff9a8a; font-size: 0.92rem; }
.rg-note { margin: 16px 0 0; color: var(--muted, #9b9486); font-size: 0.85rem; text-align: center; }
.rg-api-hint { text-align: center; margin-top: 22px; color: var(--muted, #9b9486); }
.rg-api-hint a { color: var(--gold, #d4a634); }

/* the result overlay */
.rg-dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: min(560px, 94vw); width: 100%; overflow: visible; }
.rg-dialog::backdrop { background: rgba(5, 4, 2, 0.72); backdrop-filter: blur(6px); }
.rg-sheet { position: relative; padding: 28px 24px 22px; border-radius: 24px; background: radial-gradient(120% 90% at 50% 0%, rgba(212, 166, 52, 0.22), rgba(16, 13, 8, 0.96) 62%); border: 1px solid rgba(247, 220, 141, 0.45); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), 0 0 60px -10px rgba(212, 166, 52, 0.45); animation: rg-pop 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes rg-pop { from { opacity: 0; transform: translateY(18px) scale(0.94); } to { opacity: 1; transform: none; } }
.rg-sheet h2 { margin: 0 0 4px; font-size: 1.2rem; }
.rg-sheet .rg-sub { margin: 0 0 16px; color: var(--muted, #9b9486); font-size: 0.9rem; }
.rg-close { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.06); color: inherit; cursor: pointer; display: grid; place-items: center; }
.rg-close:hover { border-color: var(--gold, #d4a634); }
.rg-close .icon { width: 16px; height: 16px; }
.rg-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-height: min(56vh, 420px); overflow: auto; }
.rg-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(212, 166, 52, 0.28); animation: rg-in 0.4s ease both; }
.rg-item:nth-child(2) { animation-delay: 0.08s; }
.rg-item:nth-child(3) { animation-delay: 0.16s; }
@keyframes rg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rg-cal { display: grid; place-items: center; min-width: 76px; padding: 8px 10px; border-radius: 14px; background: linear-gradient(145deg, #f7dc8d, #c9971f); color: #1a1407; line-height: 1.1; }
.rg-cal b { font-size: 1.55rem; }
.rg-cal small { font-size: 0.72rem; font-weight: 700; }
.rg-meta { display: grid; gap: 3px; font-size: 0.92rem; }
.rg-meta span { color: var(--muted, #b9b2a3); }
.rg-meta bdi { color: var(--text, #f3eee2); font-weight: 600; }
.rg-empty { text-align: center; padding: 22px 8px; color: var(--muted, #b9b2a3); }
@media (prefers-reduced-motion: reduce) { .rg-sheet, .rg-item { animation: none; } }
@media (max-width: 520px) { .rg-row { flex-direction: column; } .rg-card { padding: 30px 18px 22px; } }

/* the widget inside the admin dashboard */
.rg-admin { display: grid; gap: 10px; }
.rg-admin .rg-row { align-items: stretch; }

/* the API panel */
.rg-key { display: flex; gap: 8px; align-items: center; }
.rg-key .input { flex: 1; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.rg-code { display: block; margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.08); font-family: ui-monospace, monospace; font-size: 0.8rem; line-height: 1.7; direction: ltr; text-align: left; overflow-x: auto; white-space: pre; }
.rg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.rg-stats div { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); text-align: center; }
.rg-stats dt { font-size: 0.78rem; color: var(--muted, #9b9486); }
.rg-stats dd { margin: 4px 0 0; font-size: 1.3rem; font-weight: 800; color: var(--gold, #d4a634); }
.rg-regen { margin-top: 10px; }
