/*
 * The website auth dialogs (25 Oct 2026): "Check your phone number" and
 * "No Internet Connection" - one modal (public/js/site/gt-dialog.js).
 *
 * Self-contained: the auth pages run on three different stylesheet stacks
 * (Bootstrap 3, Bootstrap 4, the portal's), so every rule here is scoped to
 * .gtd and resets what those stacks set on h2 / p / button. The brand colour
 * comes in as --gtd-accent / --gtd-accent-ink on the dialog (the site's
 * site_color, else the panel accent: partials/auth-dialogs.blade.php).
 * Label / value: the example's label is grey 13px, its value dark 17px at
 * weight 500 - never bold (house rule).
 */
.gtd {
    --gtd-accent: #1a73e8;
    --gtd-accent-ink: #ffffff;
    --gtd-ink: #111827;
    --gtd-ink-soft: #5b6474;
    --gtd-ink-faint: #6b7280;
    --gtd-line: #e3e7ee;
    --gtd-tint-fill: #fdeeee;
    --gtd-example-bg: #f3f6fb;
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    width: min(440px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    overflow: visible;
    color: var(--gtd-ink);
    font-family: inherit;
    text-align: center;
    z-index: 2147483000;
}
.gtd:not([open]) { display: none; }
.gtd::backdrop { background: rgba(17, 24, 39, .55); backdrop-filter: blur(3px); }
html.gtd-open { overflow: hidden; }

.gtd *, .gtd *::before, .gtd *::after { box-sizing: border-box; }
.gtd-card {
    position: relative;
    background: #fff;
    border-radius: 24px;
    padding: 26px 24px 24px;
    box-shadow: 0 24px 60px rgba(17, 24, 39, .28);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}
.gtd-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f1f3f6;
    color: #4b5563;
    cursor: pointer;
    padding: 0;
    margin: 0;
}
[dir="rtl"] .gtd-x { right: auto; left: 14px; }
.gtd-x:hover { background: #e6e9ee; }
.gtd-x:focus-visible, .gtd-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--gtd-accent) 55%, #fff);
    outline-offset: 2px;
}

.gtd-art { display: flex; justify-content: center; margin: 4px auto 10px; }
.gtd-art-svg { display: block; width: 200px; height: auto; max-width: none; }
.gtd[data-kind="offline"] .gtd-art-svg { width: 230px; }
.gtd-tint { fill: var(--gtd-tint-fill); }
.gtd-art-phone { position: relative; width: 200px; }
.gtd-flag {
    position: absolute;
    left: 50%;
    top: 30%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.gtd .gtd-title {
    margin: 0 0 8px;
    padding: 0;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--gtd-ink);
    font-family: inherit;
    text-transform: none;
}
.gtd .gtd-msg {
    margin: 0 auto 18px;
    max-width: 34ch;
    font-size: 15px;
    line-height: 1.5;
    color: var(--gtd-ink-soft);
}

.gtd-example {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 20px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--gtd-example-bg);
    text-align: left;
}
[dir="rtl"] .gtd-example { text-align: right; }
.gtd-example-icon { display: inline-flex; color: var(--gtd-accent); flex: none; }
.gtd-example-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gtd-example-label { font-size: 13px; font-weight: 400; color: var(--gtd-ink-faint); }
.gtd-example-value { font-size: 17px; font-weight: 500; color: var(--gtd-ink); overflow-wrap: anywhere; }

.gtd-tips {
    margin: -6px 0 18px;
    padding: 12px 16px 12px 34px;
    border-radius: 14px;
    background: var(--gtd-example-bg);
    text-align: left;
    font-size: 14px;
    line-height: 1.45;
    color: var(--gtd-ink-soft);
}
[dir="rtl"] .gtd-tips { text-align: right; padding: 12px 34px 12px 16px; }
.gtd-tips[hidden] { display: none; }
.gtd-tips li + li { margin-top: 6px; }
.gtd .gtd-status { margin: -8px 0 14px; font-size: 14px; color: var(--gtd-ink-soft); min-height: 0; }
.gtd .gtd-status:empty { display: none; }

.gtd-actions { display: flex; gap: 12px; }
.gtd-btn {
    flex: 1 1 0;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0 16px;
    border-radius: 14px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}
.gtd-btn svg { flex: none; }
.gtd-btn--primary { background: var(--gtd-accent); color: var(--gtd-accent-ink); border: 1px solid var(--gtd-accent); }
.gtd-btn--primary:hover { filter: brightness(.95); }
.gtd-btn--ghost { background: #fff; color: var(--gtd-ink); border: 1px solid var(--gtd-line); }
.gtd-btn--ghost:hover { background: #f7f8fa; }
.gtd-btn--block { width: 100%; }
.gtd-btn[disabled] { opacity: .55; cursor: not-allowed; }

.gtd-field-error { margin: 6px 0 0; font-size: 13px; color: #b42318; text-align: left; }
[dir="rtl"] .gtd-field-error { text-align: right; }

@media (max-width: 420px) {
    .gtd-card { padding: 22px 18px 18px; border-radius: 20px; }
    .gtd-art-svg { width: 170px; }
    .gtd-art-phone { width: 170px; }
    .gtd[data-kind="offline"] .gtd-art-svg { width: 200px; }
    .gtd-flag { font-size: 26px; }
    .gtd .gtd-title { font-size: 20px; }
    .gtd[data-kind="offline"] .gtd-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) {
    .gtd[open] .gtd-card { animation: gtd-in .18s ease-out; }
    @keyframes gtd-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
}
