/* The saved games window, the subscription card over the map, and the lock marks of a place a free player may not enter. The saves window is the
 * journal's own window (tabletop_panels.css .tt-journal: head, body, groups); this file adds what is special to it. */

/* --- The saved games window ------------------------------------------------------------------------------------------------ */

.tt-saves-backdrop {
    z-index: 46;
}

/* the window that opens from the start screen lies over it */
.tt-start-backdrop {
    z-index: 90;
    background: #0b0d12;
}

.tt-saves-form {
    margin-bottom: 8px;
}

.tt-saves-row {
    display: flex;
    gap: 8px;
}

.tt-saves-name {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(226, 185, 90, 0.35);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    color: var(--tt-text);
    font-family: var(--tt-body);
    font-size: 16px;
    user-select: text;
}

.tt-saves-name:focus {
    border-color: var(--tt-gold);
    outline: none;
}

.tt-saves-hint {
    margin: 6px 2px 0;
    color: var(--tt-muted);
    font-size: 0.82rem;
}

.tt-saves-problem {
    margin: 8px 0;
    padding: 8px 12px;
    border: 1px solid var(--tt-red);
    border-radius: 8px;
    background: rgba(217, 72, 63, 0.14);
    color: var(--tt-text);
}

.tt-saves-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tt-saves-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(226, 185, 90, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.tt-saves-entry.is-locked {
    border-style: dashed;
}

.tt-saves-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tt-saves-title {
    overflow-wrap: anywhere;
    color: var(--tt-gold-hi);
    font-family: var(--tt-serif);
}

.tt-saves-lock {
    margin-right: 6px;
    font-size: 0.8em;
    color: var(--tt-gold);
}

.tt-saves-place {
    color: var(--tt-text);
    font-size: 0.9rem;
}

.tt-saves-meta {
    color: var(--tt-muted);
    font-size: 0.78rem;
}

.tt-saves-actions {
    display: flex;
    flex: none;
    gap: 6px;
}

@media (max-width: 520px) {
    .tt-saves-entry {
        flex-direction: column;
        align-items: stretch;
    }

    .tt-saves-actions .tt-btn:first-child {
        flex: 1;
    }
}

/* --- The subscription card ------------------------------------------------------------------------------------------------- */

.tt-paywall-backdrop {
    z-index: 95;
}

.tt-paywall {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 12px;
    overflow-y: auto;
    border: 1px solid var(--tt-gold);
    border-radius: 16px;
    background: rgba(14, 16, 22, 0.96);
    box-shadow: 0 20px 60px #000;
    user-select: text;
}

.tt-paywall-close {
    align-self: flex-end;
}

/* the card is the site's own; it needs no margin of its own inside the window */
.tt-paywall-card .bigass-register-card {
    margin-bottom: 0;
}

.tt-paywall-later {
    align-self: center;
}

/* --- Places a free player may not enter ------------------------------------------------------------------------------------ */

.tt-world-place {
    position: relative;
}

.tt-world-lock {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--tt-gold);
    font-size: 0.78rem;
}

/* A place the plan has next to the first one, not written yet: listed greyed, with its lock. */
.tt-world-place.is-locked {
    opacity: 0.6;
    filter: grayscale(0.7);
}

/* For a visitor without an account: how long the game is kept, with the way to an account. */
.tt-saves-kept {
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid var(--tt-line);
    border-radius: 8px;
    background: rgba(214, 170, 82, 0.1);
    color: var(--tt-text);
    font-size: 0.85rem;
    line-height: 1.4;
}

.tt-saves-kept a {
    color: var(--tt-gold-hi);
    text-decoration: underline;
}
