/*
 * Roxty i18n — Estilos del Language Switcher y Admin
 * v1.0.0
 */

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --rxty-i18n-accent:   #6B2FBD;
  --rxty-i18n-gold:     #F5C842;
  --rxty-i18n-surface:  #ffffff;
  --rxty-i18n-border:   #e2e8f0;
  --rxty-i18n-text:     #1a202c;
  --rxty-i18n-muted:    #718096;
  --rxty-i18n-radius:   8px;
  --rxty-i18n-shadow:   0 2px 8px rgba(0,0,0,.12);
}

/* ── Switcher base ───────────────────────────────────────────────────────── */
.rxty-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* ── Flags ───────────────────────────────────────────────────────────────── */
.rxty-lang-switcher--flags .rxty-lang-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.4em;
  line-height: 1;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
  opacity: .75;
}
.rxty-lang-switcher--flags .rxty-lang-item:hover,
.rxty-lang-switcher--flags .rxty-lang-item--active {
  opacity: 1;
  transform: scale(1.15);
}
.rxty-lang-switcher--flags .rxty-lang-item--active {
  box-shadow: 0 0 0 2px var(--rxty-i18n-accent);
}

/* ── Links ───────────────────────────────────────────────────────────────── */
.rxty-lang-switcher--links {
  gap: 0;
}
.rxty-lang-switcher--links .rxty-lang-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  color: var(--rxty-i18n-text);
  text-decoration: none;
  font-size: .875rem;
  border-radius: var(--rxty-i18n-radius);
  transition: background .15s ease, color .15s ease;
}
.rxty-lang-switcher--links .rxty-lang-item:hover {
  background: rgba(107,47,189,.08);
  color: var(--rxty-i18n-accent);
}
.rxty-lang-switcher--links .rxty-lang-item--active {
  font-weight: 600;
  color: var(--rxty-i18n-accent);
}
.rxty-lang-switcher--links .rxty-lang-item + .rxty-lang-item::before {
  content: '|';
  color: var(--rxty-i18n-border);
  margin-right: 10px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.rxty-lang-switcher--buttons {
  gap: 6px;
}
.rxty-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--rxty-i18n-border);
  border-radius: var(--rxty-i18n-radius);
  color: var(--rxty-i18n-text);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  background: var(--rxty-i18n-surface);
  transition: all .15s ease;
}
.rxty-lang-btn:hover {
  border-color: var(--rxty-i18n-accent);
  color: var(--rxty-i18n-accent);
  background: rgba(107,47,189,.05);
}
.rxty-lang-btn--active {
  border-color: var(--rxty-i18n-accent);
  background: var(--rxty-i18n-accent);
  color: #fff !important;
}

/* ── Dropdown ────────────────────────────────────────────────────────────── */
.rxty-lang-switcher--dropdown .rxty-lang-select {
  padding: 6px 12px;
  border: 1.5px solid var(--rxty-i18n-border);
  border-radius: var(--rxty-i18n-radius);
  font-size: .875rem;
  background: var(--rxty-i18n-surface);
  color: var(--rxty-i18n-text);
  cursor: pointer;
  appearance: auto;
  outline: none;
  transition: border-color .15s ease;
}
.rxty-lang-switcher--dropdown .rxty-lang-select:focus {
  border-color: var(--rxty-i18n-accent);
}

/* ── Flag emoji ──────────────────────────────────────────────────────────── */
.rxty-lang-flag {
  font-size: 1.2em;
  line-height: 1;
}
.rxty-lang-name {
  font-size: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* Admin UI                                                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

#rxty-i18n-settings .rxty-i18n-page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  margin-bottom: 24px;
}
#rxty-i18n-settings .rxty-i18n-icon { font-size: 1.6rem; }
#rxty-i18n-settings .rxty-i18n-version {
  font-size: .75rem;
  font-weight: 400;
  color: #999;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 20px;
}

/* Grid de cards */
.rxty-i18n-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.rxty-i18n-card {
  background: #fff;
  border: 1px solid var(--rxty-i18n-border);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--rxty-i18n-shadow);
}
.rxty-i18n-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 14px 0;
  padding: 0 0 10px 0;
  border-bottom: 1px solid var(--rxty-i18n-border);
  color: #1a202c;
}

/* Tabla de idiomas */
.rxty-i18n-langs-table { border-radius: 6px; overflow: hidden; }
.rxty-i18n-langs-table th { background: #f8f9fa; font-size: 12px; }
.rxty-i18n-langs-table .rxty-flag { font-size: 1.4em; text-align: center; }
.rxty-i18n-langs-table code {
  background: #f0f4f8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* Badges */
.rxty-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.rxty-badge--green { background: #d4edda; color: #155724; }

/* Status messages */
.rxty-i18n-status {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
}
.rxty-i18n-status.success { background: #d4edda; color: #155724; }
.rxty-i18n-status.error   { background: #f8d7da; color: #721c24; }

/* Eco card */
.rxty-i18n-card--eco .rxty-i18n-eco-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rxty-i18n-eco-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.rxty-i18n-eco-list li:last-child { border-bottom: none; }
.rxty-eco-inactive { opacity: .5; }
.rxty-i18n-eco-list .description {
  color: var(--rxty-i18n-muted);
  font-size: 12px;
  margin-left: auto;
}

/* Add lang row */
.rxty-i18n-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
