/* Guest account (public/guest-account.js, server POST /api/guest): the "Hemen oyna" block on the sign-in card, the strip under the top bar and the
   "Köyünü kaydet" dialog. Loaded with the sign-in card (data-card): the card shows it before any game module is loaded. Loaded after ui-modern-a.css so it
   wins over the card's "Oyuna Bak" outline, which turns into a plain link while "Hemen oyna" is shown. */

/* ---- sign-in card ---- */
#auth .auth-play { margin: -10px 0 18px; }
#auth .auth-play[hidden] { display: none; }
#auth .auth-play #auth-play {
  box-sizing: border-box; width: 100%; min-height: 50px; padding: 10px 12px;
  border: 6px solid transparent; border-image-source: url('ui/buttonLong_beige.png'); border-image-slice: 6; border-image-repeat: stretch; border-radius: 0;
  background: var(--btn-beige); box-shadow: none; color: var(--ink); font: 700 15px/1.2 var(--font-body);
}
#auth .auth-play #auth-play:disabled { opacity: .7; cursor: wait; }
#auth .auth-play #auth-play:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
#auth .auth-play-note, #auth .auth-play-terms { margin: 8px 0 0; color: var(--muted, #785c3d); font: 500 12px/1.4 var(--font-body); text-align: center; }
#auth .auth-play-note { margin-top: 10px; font-weight: 600; }
#auth .auth-play-terms a { color: inherit; text-decoration: underline; }
#auth .auth-play .auth-form-error { margin: 8px 0 0; text-align: center; }
html.iso.ui-a #auth.auth-shell .auth-play #auth-play {
  border: 0; border-radius: 14px; background: var(--a-accent); color: var(--a-on-accent); box-shadow: 0 6px 16px -6px rgba(56, 178, 201, .55);
}
@media (hover: hover) { html.iso.ui-a #auth.auth-shell .auth-play #auth-play:hover:enabled { background: var(--a-accent-hover); } }
html.iso.ui-a #auth.auth-shell .auth-play #auth-play:focus-visible { outline: 2px solid var(--a-accent-text); outline-offset: 2px; }
html.iso.ui-a #auth.auth-shell .auth-play .auth-play-note { color: #c9cccf; }
html.iso.ui-a #auth.auth-shell .auth-play .auth-play-terms { color: var(--muted); }
/* Oyuna Bak stays, as a plain link under the new primary button */
#auth .auth-play:not([hidden]) + .auth-guest { margin: -6px 0 18px; text-align: center; }
#auth .auth-play:not([hidden]) + .auth-guest button,
html.iso.ui-a #auth.auth-shell .auth-play:not([hidden]) + .auth-guest #auth-guest {
  display: inline-block; box-sizing: border-box; width: auto; min-height: 36px; padding: 6px 10px; border: 0; border-image: none; border-radius: 8px; background: none; box-shadow: none;
  color: var(--a-accent-text, var(--ink)); font: 600 13px/1.2 var(--font-body); text-decoration: underline; text-underline-offset: 3px;
}
html.iso.ui-a #auth.auth-shell .auth-play:not([hidden]) + .auth-guest #auth-guest::after { content: none; }
@media (hover: hover) { html.iso.ui-a #auth.auth-shell .auth-play:not([hidden]) + .auth-guest #auth-guest:hover { background: none; text-decoration-thickness: 2px; } }

/* ---- strip under the top bar (a row of #top: --top-h counts it, so the quest tracker and the alerts stay clear of it) ---- */
#guest-strip {
  flex: 1 0 100%; box-sizing: border-box; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 2px 4px 2px 10px;
  border-radius: 10px; background: var(--surface-inset, rgba(255, 255, 255, .08)); color: var(--ink, #eee); font: 600 13px/1.2 var(--font-body, sans-serif);
}
#guest-strip[hidden] { display: none; }
#guest-strip .guest-strip-text { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#guest-strip button {
  flex: 0 0 auto; min-height: 30px; padding: 2px 12px; border: 1px solid var(--border, rgba(255, 255, 255, .3)); border-radius: 8px;
  background: var(--a-accent, #38b2c9); color: var(--a-on-accent, #06222a); font: 700 13px/1.2 var(--font-body, sans-serif); white-space: nowrap; cursor: var(--cursor-pointer, pointer);
}
@media (hover: hover) { #guest-strip button:hover { background: var(--a-accent-hover, #4cc4da); } }
#guest-strip button:focus-visible { outline: 2px solid var(--a-accent-text, currentColor); outline-offset: 2px; }
@media (max-width: 400px) { #guest-strip { gap: 6px; padding-left: 8px; font-size: 12px; } #guest-strip button { padding-inline: 10px; } }

/* ---- "Köyünü kaydet" dialog ---- */
dialog.guest-save {
  box-sizing: border-box; width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; margin: auto; padding: 18px 18px 14px;
  border: 1px solid var(--border, rgba(255, 255, 255, .25)); border-radius: 14px; background: var(--surface, #1b262b); color: var(--ink, #eee); box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
dialog.guest-save::backdrop { background: rgba(0, 0, 0, .45); }
dialog.guest-save h2 { margin: 0 0 6px; font: 700 18px/1.25 var(--font-body, sans-serif); }
dialog.guest-save :is(.guest-save-why, .guest-save-code-lead) { margin: 0 0 14px; color: var(--muted, inherit); font: 500 13px/1.45 var(--font-body, sans-serif); overflow-wrap: anywhere; }
dialog.guest-save label { display: block; margin: 0 0 10px; font: 600 13px/1.3 var(--font-body, sans-serif); }
dialog.guest-save input {
  display: block; box-sizing: border-box; width: 100%; min-height: 42px; margin-top: 4px; padding: 6px 10px; border: 1px solid var(--border, rgba(255, 255, 255, .3)); border-radius: 10px;
  background: var(--surface-inset, rgba(255, 255, 255, .06)); color: var(--ink, #eee); font: 500 15px/1.2 var(--font-body, sans-serif);
}
dialog.guest-save .guest-save-error { margin: 0 0 10px; color: var(--bad, #ff9b8c); font: 600 13px/1.4 var(--font-body, sans-serif); overflow-wrap: anywhere; }
dialog.guest-save .guest-save-error[hidden], dialog.guest-save [hidden] { display: none; }
dialog.guest-save .guest-save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
dialog.guest-save .guest-save-actions button {
  flex: 1 1 auto; min-height: 44px; padding: 6px 12px; border: 1px solid var(--border, rgba(255, 255, 255, .3)); border-radius: 12px; background: var(--surface-inset, rgba(255, 255, 255, .06));
  color: var(--ink, #eee); font: 700 14px/1.2 var(--font-body, sans-serif); white-space: normal; overflow-wrap: anywhere;
}
dialog.guest-save .guest-save-actions .guest-save-primary { background: var(--a-accent, #38b2c9); border-color: var(--a-accent, #38b2c9); color: var(--a-on-accent, #06222a); }
dialog.guest-save .guest-save-actions button:disabled { opacity: .7; cursor: wait; }
dialog.guest-save .guest-save-or { margin: 14px 0 8px; text-align: center; color: var(--muted, inherit); font: 600 12px/1 var(--font-body, sans-serif); }
dialog.guest-save .guest-save-provider {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 6px; padding: 6px 12px; border: 1px solid var(--border, rgba(255, 255, 255, .3)); border-radius: 12px;
  background: var(--surface-inset, rgba(255, 255, 255, .06)); color: var(--ink, #eee); font: 700 14px/1.2 var(--font-body, sans-serif); text-decoration: none; text-align: center;
}
dialog.guest-save :is(button, a, input):focus-visible { outline: 2px solid var(--a-accent-text, currentColor); outline-offset: 2px; }
