/* Glejt — base styles. Forest-green / parchment palette aligned with hra.ovcina.cz. */

:root {
    --gl-parchment: #f4ead0;
    --gl-parchment-dark: #e6d8a8;
    --gl-forest: #3a4d2e;
    --gl-forest-light: #6f8a4f;
    --gl-bordeaux: #6e2b2b;
    --gl-gold: #b08a3e;
    --gl-ink: #2a2620;
    --gl-muted: #6c6a60;
    --gl-card: #fbf6e6;

    --gl-radius: 8px;
    --gl-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

html, body {
    height: 100%;
    margin: 0;
    background: var(--gl-parchment);
    color: var(--gl-ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gl-forest); text-decoration: none; }
a:hover { text-decoration: underline; }

.glejt-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.glejt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gl-forest);
    color: var(--gl-parchment);
    box-shadow: var(--gl-shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.glejt-brand {
    color: inherit;
    font-weight: 600;
    font-size: 1.1rem;
}

.glejt-user {
    flex: 1;
    color: var(--gl-parchment);
    font-size: 0.9rem;
    opacity: 0.85;
}

.glejt-cog {
    color: inherit;
    font-size: 1.4rem;
    line-height: 1;
}

.glejt-main {
    flex: 1;
    padding: 16px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

/* Sync pill */
.sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.sync-pill--ok { background: #2d6a4f; color: white; }
.sync-pill--pending { background: #d4a72c; color: var(--gl-ink); }
.sync-pill--offline { background: var(--gl-bordeaux); color: white; }

/* Big buttons (mobile-first) */
.btn-glejt {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    border-radius: var(--gl-radius);
    border: 0;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.1s;
}
.btn-glejt:active { filter: brightness(0.92); }

.btn-glejt-primary { background: var(--gl-forest); color: var(--gl-parchment); }
.btn-glejt-secondary { background: var(--gl-parchment-dark); color: var(--gl-ink); }
.btn-glejt-danger { background: var(--gl-bordeaux); color: var(--gl-parchment); }
.btn-glejt-success { background: #2d6a4f; color: white; }
.btn-glejt-warning { background: var(--gl-gold); color: var(--gl-ink); }

/* Character page big tile */
.character-tile {
    background: var(--gl-card);
    border: 2px solid var(--gl-gold);
    border-radius: var(--gl-radius);
    padding: 24px;
    text-align: center;
    margin: 16px 0;
}
.character-tile-level { font-size: 2rem; font-weight: 700; color: var(--gl-forest); }

/* Pending vision quest row */
.pending-quest {
    background: var(--gl-card);
    border-left: 4px solid var(--gl-gold);
    border-radius: var(--gl-radius);
    padding: 12px 16px;
    margin: 12px 0;
}

/* Event log */
.event-row {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gl-parchment-dark);
    font-size: 0.85rem;
    color: var(--gl-muted);
}

/* Modal */
.glejt-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.glejt-modal {
    background: var(--gl-parchment);
    border-radius: var(--gl-radius);
    padding: 24px 16px;
    width: min(90vw, 360px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Bootstrap loader */
.glejt-bootstrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    color: var(--gl-muted);
}

/* Blazor error */
#blazor-error-ui {
    background: var(--gl-bordeaux);
    color: var(--gl-parchment);
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.3);
    display: none;
    left: 0;
    padding: 12px 16px;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }
