/* Region picker page (Pages/SelectRegion.cshtml).
   Standalone Layout=null page that mirrors the AuthServer's Account/Default
   layout — same Landscape background, same logo placement, same ornamental
   container, same flag cards. Texts are ours (title + subtitle + footnote);
   visuals are auth-side. */

.region-picker-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    /* Same Landscape art as the main layout, with a 45% dark tint layered on
       top so the gold/yellow text and the ornamental container stay readable
       across any part of the image. */
    background-color: #0c0c0e;
    background-image:
        linear-gradient(rgba(12, 12, 14, 0.45), rgba(12, 12, 14, 0.45)),
        url('/images/WebUI/Landscape.png?v=2');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    color: #ffff96;
    font-family: 'Ithaca', serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.region-picker-body * {
    box-sizing: border-box;
}

/* Centers the ornamental container both horizontally and vertically in the
   space below the logo. Replaces the Bootstrap col layout that was leaving
   the picker pinned to the left. */
.region-picker-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 2rem;
}

/* ── Top logo (matches AuthServer) ── */
.auth-top-logo {
    text-align: center;
    padding-top: 25px;
    line-height: 0;
}
.auth-top-logo img {
    image-rendering: pixelated;
    width: 349px;
    max-width: 100%;
    height: auto;
}

@media (min-width: 900px) {
    .auth-top-logo img {
        width: 698px; /* exactly 2x */
    }
}

/* ── Ornamental 9-slice container (mirrors AuthServer's auth-container) ── */
.auth-container {
    position: relative;
    width: 512px;
    max-width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-style: solid;
    border-color: transparent;
    border-image: url('/images/WebUI/Container_7.png') 16 fill / 32px stretch;
    padding: 32px 44px;
    margin-top: 34px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.auth-container::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 230px;
    height: 34px;
    background: url('/images/WebUI/Decorative_Element_3.png') center / 230px 34px no-repeat;
    image-rendering: pixelated;
    pointer-events: none;
}
.auth-container.region-picker-card {
    min-height: 300px;
    text-align: center;
}
.auth-container hr { display: none; }

@media (max-width: 768px) {
    .auth-container {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* ── Title / lede / footnote (our texts, auth-styled) ── */
.region-picker-title {
    font-family: 'Ithaca', serif;
    font-size: 2.4em;
    color: #ffff96;
    text-transform: none;
    letter-spacing: 0.5px;
    margin: 0 0 0.75rem;
}
.region-picker-lede {
    font-family: 'Ithaca', serif;
    font-size: 1.15em;
    color: #c8a96e;
    margin: 0 0 1.75rem;
    line-height: 1.4;
}
/* ── Inline error (kept from before; styled to fit the gold/yellow palette) ── */
.region-picker-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #f5b3b8;
    padding: 0.6rem 0.9rem;
    border-radius: 4px;
    margin: 0 0 1rem;
    font-size: 0.95em;
}

/* ── Flag cards (verbatim AuthServer styling) ── */
.region-picker-form {
    margin: 0;
}
.region-flags {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.region-flag {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #c8a96e;
    border-radius: 0;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.1s, background 0.1s;
    width: 140px;
    height: 150px;
    flex-shrink: 0;
    image-rendering: pixelated;
    color: inherit;
    font-family: inherit;
}
.region-flag:hover,
.region-flag:focus-visible {
    border-color: #ffff96;
    background: rgba(255, 255, 150, 0.08);
    outline: none;
}
.flag-image img {
    border-radius: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
    image-rendering: pixelated;
    margin: 0 auto 10px;
    width: 97px;
    height: 65px;
    display: block;
}
.region-flag:hover .flag-image img {
    filter: brightness(1.1);
}
.flag-label {
    font-family: 'Ithaca', serif;
    font-size: 1.5em;
    color: #ffff96;
}

@media (max-width: 480px) {
    .auth-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    .region-flags {
        gap: 10px;
    }
    .region-flag {
        width: auto;
        flex: 0 1 140px;
        height: auto;
        min-height: 150px;
        padding: 16px 8px;
    }
}
