/* Global reset and base styles moved from base.html.twig */
:root {
  --gold: #daa520;
  --emerald: #50c878;
  --silver: #c0c0c0;
  --sapphire: #0f52ba;
  --dark-green: #0b5c2a;
  --r-sm: 4px;
  --r-lg: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 20px;
  color: var(--emerald);
}

body {
  margin: 10px;
  padding: 3px;
  min-height: calc(100vh - 20px);
  background: url('../img/bg.png') repeat;
  border: 1px solid var(--gold);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.lang-flag {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: transform 0.2s;
}

.lang-flag:hover {
  transform: scale(1.5);
  box-shadow: 0 0 20px color-mix(in srgb, var(--gold) 50%, transparent);
}

/* Utility */
.container {
  max-width: 820px;
  margin: 30px auto;
  padding: 20px;
}

.card {
  max-width: 420px;
  margin: 30px auto;
  padding: 20px;
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  background: transparent;
}

.card--mt40 {
  margin-top: 40px;
}

.card--wide {
  max-width: 820px;
}

.heading-gold {
  color: var(--gold);
  margin-bottom: 8px;
  text-align: center;
  font-size: 1.5rem;
}

.wallet-withdraw-warning {
  color: var(--emerald);
  text-align: center;
  margin: 8px 0 8px;
}

.wallet-divider {
  border: none;
  border-top: 1px solid rgba(218, 165, 32, 0.3);
  margin: 20px 0;
}

.wallet-nav-above {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin: 12px auto 18px;
}

.heading-emerald {
  color: var(--emerald);
  text-align: center;
}

.btn,
.btn-provider {
  display: inline-block;
  text-decoration: none;
  border-radius: var(--r-sm);
}

.btn {
  padding: 8px 12px;
}

.btn--gold {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #000;
}

.btn--silver {
  border: 1px solid var(--silver);
  background: var(--silver);
  color: #000;
}

.btn--sapphire {
  border: 1px solid var(--sapphire);
  background: var(--sapphire);
  color: #fff;
}

.btn--outline-gold {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
}

.btn--neutral {
  border: 1px solid #ccc;
  background: #f7f7f7;
  color: #111;
}

.btn-group,
.home-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.btn-group--compact {
  gap: 8px;
}

.btn-provider {
  text-align: center;
  padding: 10px;
  position: relative;
}

.btn--google {
  border: 1px solid var(--gold);
  background: #fff;
  color: #111;
}

.btn--facebook {
  border: 1px solid #3b5998;
  background: #3b5998;
  color: #fff;
}

.btn--apple {
  border: 1px solid #999;
  background: #ccc;
  color: #111;
}

.provider-icon {
  width: 36px;
  height: 36px;
  vertical-align: middle;
  margin-right: 8px;
}

.text-center {
  text-align: center;
}

.text-emerald-bold {
  color: var(--emerald);
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-title {
  text-align: center;
  color: var(--gold);
  font-weight: 600;
  margin: 8px 0;
  font-size: 1.1rem;
}

.lang-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
  padding: 8px;
}

.logout-wrapper {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 40px;
  padding-bottom: 20px;
}

.btn-logout {
  background-color: #dc3545;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s;
}

/* Main menu (home, signed-in) */
.main-menu-section {
  width: 100%;
  max-width: 420px;
  margin: 8px auto 0;
  text-align: center;
}

.heading-gold--sub {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.main-menu-meta {
  color: #111;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  margin: 8px auto 0;
  max-width: 100%;
  text-align: center;
}

.main-menu-meta strong {
  color: var(--gold);
}

.main-menu-meta__heading {
  display: block;
  margin-bottom: 8px;
  color: var(--dark-green);
  font-weight: 600;
  cursor: default;
}

.main-menu-email {
  display: block;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.main-menu-meta + .main-menu-meta {
  margin-top: 12px;
}

.main-menu-preferences-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.main-menu-select {
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.65);
  color: #111;
  font: inherit;
  box-sizing: border-box;
  text-align: left;
}

.main-menu-select:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.main-menu-preferences__submit {
  margin-top: 16px;
  text-align: center;
}

.guest-register-section {
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-top: 16px;
}

.main-menu-meta--fallback {
  font-style: italic;
  color: #555;
}

/* Country dropdown with flags (profile form) */
.pref-country-picker__hint {
  margin: 0;
}

.pref-country-picker__combo {
  position: relative;
  margin-top: 8px;
  text-align: left;
}

.pref-country-picker__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.65);
  color: #111;
  font: inherit;
  cursor: pointer;
}

.pref-country-picker__trigger:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.pref-country-picker__trigger-flag {
  object-fit: cover;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  border: 1px solid #ccc;
}

.pref-country-picker__trigger-label {
  flex: 1;
  text-align: left;
  font-size: 0.98rem;
}

.pref-country-picker__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  max-height: min(280px, 40vh);
  overflow: auto;
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.pref-country-picker__list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.pref-country-picker__list li {
  margin: 0;
  padding: 0;
}

.pref-country-picker__option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #111;
  text-align: left;
}

.pref-country-picker__option:hover,
.pref-country-picker__option:focus-visible {
  background: rgba(218, 165, 32, 0.2);
}

.pref-country-picker__option:focus-visible {
  outline: none;
}

.pref-country-picker__flag {
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid #ddd;
}

.pref-country-picker__name {
  font-size: 0.95rem;
}

/* Wallet transfer log */
.wallet-log-actions {
  margin: 12px auto 16px;
  align-items: center;
}

.wallet-log-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.wallet-log-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--gold);
  background: rgba(255, 255, 255, 0.58);
  color: #111;
}

.wallet-log-table th,
.wallet-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(218, 165, 32, 0.45);
  text-align: left;
  vertical-align: top;
}

.wallet-log-table th {
  color: var(--dark-green);
  background: rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.wallet-log-table tr:last-child td {
  border-bottom: 0;
}

.wallet-log-direction,
.wallet-log-amount {
  font-weight: 700;
  white-space: nowrap;
}

.wallet-log-direction--credit,
.wallet-log-amount--credit {
  color: #116c2e;
}

.wallet-log-direction--debit,
.wallet-log-amount--debit {
  color: #9f1d1d;
}

.wallet-log-comment {
  overflow-wrap: anywhere;
}

.wallet-log-empty {
  margin-top: 14px;
}

.wallet-transfer-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.wallet-transfer-form label {
  color: var(--emerald);
  font-weight: 700;
}

.wallet-transfer-form input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  font: inherit;
}

.wallet-transfer-form input[type="text"]:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.wallet-transfer-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: #111;
  text-align: center;
}

.wallet-transfer-message--success {
  border: 1px solid #116c2e;
  background: rgba(80, 200, 120, 0.22);
}

.wallet-transfer-message--error {
  border: 1px solid #9f1d1d;
  background: rgba(220, 53, 69, 0.16);
}

.wallet-transfer-confirm {
  margin-top: 14px;
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.58);
  color: #111;
}

.wallet-transfer-confirm div {
  display: grid;
  grid-template-columns: minmax(120px, 42%) 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(218, 165, 32, 0.45);
}

.wallet-transfer-confirm div:last-child {
  border-bottom: 0;
}

.wallet-transfer-confirm dt {
  color: var(--dark-green);
  font-weight: 700;
}

/* Emerald label for specific fields on transfer confirm */
.wallet-transfer-confirm dt.emerald-dt {
  color: var(--emerald);
}

.wallet-transfer-confirm dd {
  color: #000;
  overflow-wrap: anywhere;
}

/* ── Games page ─────────────────────────────────────────── */
.games-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.game-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  text-align: center;
}

.game-card__name {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
}

.game-card__desc {
  display: block;
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 6px;
}

.game-card__form {
  width: 100%;
}

.game-card__btn {
  flex: 1;
  height: 44px;
  padding: 10px 16px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  border-radius: var(--r-sm);
  background: var(--gold);
  color: #000;
  font-weight: 600;
  transition: opacity 0.15s;
}

.game-card__btn:hover {
  opacity: 0.85;
}

.game-card__btn--guest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 44px;
  padding: 10px 16px;
  font-size: 1rem;
  border: none;
  border-radius: var(--r-sm);
  background: var(--gold);
  color: #000;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.game-card__btn--guest:hover {
  opacity: 0.85;
}

.game-card__actions {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: stretch;
}

.game-card__info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--silver);
    border: 1px solid var(--silver);
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    transition: opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0;
}
.game-card__info-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}



/* ── Mail page ─────────────────────────────────────────── */
.mail-unread {
  color: #9f1d1d;
  font-weight: 700;
}

.mail-read {
  color: #116c2e;
}

.mail-message {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.58);
}

.mail-message-field {
  display: flex;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(218, 165, 32, 0.45);
}

.mail-message-field:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.mail-message-label {
  color: var(--dark-green);
  font-weight: 700;
  min-width: 140px;
}

.mail-message-value {
  color: #000;
  flex: 1;
}

.mail-message-text {
  color: #000;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.mail-message-field--column {
  flex-direction: column !important;
  align-items: center !important;
}

.mail-message-text--ltr {
  text-align: left;
  width: 100%;
}

.mail-message-text--rtl {
  text-align: right;
  width: 100%;
  direction: rtl;
}

.mail-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  text-align: center;
}

.mail-original-message {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--silver);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.45);
}

.mail-reply-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  color: var(--emerald);
  font-weight: 700;
  margin-bottom: 8px;
}

.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  font: inherit;
  font-family: inherit;
  resize: vertical;
}

.form-group textarea:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  font: inherit;
}

.form-group input[type="text"]:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.form-group--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.textarea--90 {
  width: 90% !important;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.error-message {
  padding: 10px 12px;
  border: 1px solid #9f1d1d;
  background: rgba(220, 53, 69, 0.16);
  border-radius: var(--r-sm);
  color: #9f1d1d;
  margin-bottom: 16px;
  text-align: center;
}

.heading-silver {
  color: var(--silver);
  margin-bottom: 12px;
  text-align: center;
  font-size: 1.3rem;
}

/* Currency symbols row for mail composing/replying */
.currency-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 90%;
  margin: 12px auto;
  gap: 8px;
  padding: 8px;
}

.currency-symbol-btn {
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--gold);
}

/* Payment form styles */
.payment-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
}

.payment-form .form-group {
  margin-bottom: 20px;
}

.payment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--silver);
}

.payment-form input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--gold);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.45);
  color: var(--gold);
}

.payment-currency {
  font-size: 1.2rem;
  margin-left: 8px;
  color: var(--gold);
}

.payment-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.payment-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.currency-symbol-btn:hover {
  transform: scale(1.5);
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 20px color-mix(in srgb, var(--gold) 50%, transparent);
}

@media (max-width: 1600px) {
  body {
    zoom: 1.4;
  }
}
