/* Nepali Tools Suite - Public Frontend Styling (Conflict-Free) */
:root {
  --np-primary: #dc2626;
  --np-primary-hover: #b91c1c;
  --np-bg-card: #ffffff;
  --np-border: #e2e8f0;
  --np-text: #0f172a;
  --np-text-muted: #64748b;
  --np-radius: 12px;
}

.nepali-ropani-card,
.nepali-forex-wrapper,
.nepali-currency-converter-widget,
.nepali-bullion-widget,
.nepali-date-converter-card,
.nepali-unicode-card,
.nepali-typing-card,
.nepali-words-card {
  font-family: 'Mukta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--np-bg-card);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius);
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  box-sizing: border-box;
}

.nepali-ropani-card *,
.nepali-forex-wrapper *,
.nepali-date-converter-card *,
.nepali-unicode-card *,
.nepali-typing-card *,
.nepali-words-card * {
  box-sizing: border-box;
}

/* Header & Titles */
.nrc-header, .nepali-forex-header, .ndc-header, .nuc-header, .ntc-header, .nw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--np-border);
  padding-bottom: 12px;
}

.nrc-header h3, .nepali-forex-title, .ndc-header h3, .nuc-header h3, .ntc-header h3, .nw-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--np-text);
}

.nrc-sub, .nepali-forex-sub, .ndc-sub, .nuc-sub, .ntc-hint, .nw-sub {
  margin: 4px 0 0 0;
  font-size: 0.8rem;
  color: var(--np-text-muted);
}

.nrc-badge, .nepali-forex-badge, .ndc-badge {
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #fecaca;
  white-space: nowrap;
}

/* Ropani Calculator Specific */
.nrc-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
}

.nrc-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--np-text-muted);
}

.nrc-preset-btn {
  background: white;
  border: 1px solid var(--np-border);
  color: #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.nrc-preset-btn:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.nrc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .nrc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.nrc-subheading {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
}

.nrc-fields-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.nrc-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.nrc-num-input, .nrc-select, .nw-input, .npr-input, .npr-select, .ndc-select {
  width: 100%;
  border: 1px solid var(--np-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.95rem;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.nrc-num-input:focus, .nrc-select:focus, .nw-input:focus, .npr-input:focus {
  border-color: var(--np-primary);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.nrc-valuation-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 14px;
  border-radius: 8px;
  margin-top: 16px;
}

.nrc-val-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.nrc-field-inline {
  flex: 1;
}

.nrc-field-inline label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 4px;
}

.nrc-total-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #fde68a;
  padding-top: 8px;
  font-size: 0.85rem;
  color: #92400e;
}

.nrc-total-price-val {
  font-size: 1.1rem;
  color: #b45309;
}

.nrc-result-banner {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.nrc-banner-ropani {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.nrc-banner-bigha {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.nrc-rb-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 2px;
}

.nrc-rb-main {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.nrc-rb-sub {
  font-size: 0.85rem;
  color: #475569;
}

.nrc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.nrc-metric-item {
  background: #f8fafc;
  border: 1px solid var(--np-border);
  padding: 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.nrc-m-label {
  font-size: 0.75rem;
  color: #64748b;
}

.nrc-m-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.nrc-actions-row, .ndc-footer, .nuc-footer, .ntc-credits, .nw-footer, .nepali-forex-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--np-border);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.nrc-developer-tag a, .ndc-footer a, .nuc-footer a, .ntc-credits a, .nw-footer a, .nepali-forex-footer a {
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
}

.nrc-copy-btn, .nw-copy-btn, .ntc-btn, .nuc-btn, .ndc-action-btn, .npr-btn {
  background: var(--np-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.nrc-copy-btn:hover, .nw-copy-btn:hover, .ntc-btn:hover, .nuc-btn:hover, .ndc-action-btn:hover, .npr-btn:hover {
  background: var(--np-primary-hover);
}

.ntc-btn.secondary, .nuc-btn.secondary {
  background: #e2e8f0;
  color: #334155;
}

.ntc-btn.secondary:hover, .nuc-btn.secondary:hover {
  background: #cbd5e1;
}

/* Forex Table */
.nepali-forex-table-wrap {
  overflow-x: auto;
}

.nepali-forex-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.nepali-forex-table th {
  background: #f8fafc;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--np-text-muted);
  border-bottom: 2px solid var(--np-border);
}

.nepali-forex-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--np-border);
  font-size: 0.95rem;
}

.curr-name {
  font-size: 0.8rem;
  color: #64748b;
  margin-left: 4px;
}

.rate-buy {
  color: #16a34a;
  font-weight: 700;
}

.rate-sell {
  color: #dc2626;
  font-weight: 700;
}

/* Textareas & Inputs */
.ntc-textarea, .nuc-textarea {
  width: 100%;
  border: 1px solid var(--np-border);
  border-radius: 8px;
  padding: 12px;
  font-size: 1.05rem;
  line-height: 1.6;
  resize: vertical;
}

.ntc-textarea:focus, .nuc-textarea:focus {
  outline: none;
  border-color: var(--np-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.ntc-footer, .nuc-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.nepali-today-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  color: #991b1b;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #fecaca;
}

/* Date Converter */
.ndc-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ndc-tab-btn {
  background: #f1f5f9;
  border: 1px solid var(--np-border);
  color: #475569;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.ndc-tab-btn.active {
  background: var(--np-primary);
  color: white;
  border-color: var(--np-primary);
}

.ndc-inputs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ndc-result-display {
  background: #f8fafc;
  border: 1px solid var(--np-border);
  padding: 14px;
  border-radius: 8px;
  margin-top: 14px;
}

.ndc-res-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 4px;
}

.ndc-res-date {
  font-size: 1.15rem;
  color: #0f172a;
}
