﻿/* =============================
   Token Creator — Card Layout
   ============================= */

/* band stays the same */
.token-band {
    --band-img: url('/img/bg10.webp');
}

/* Center the whole app and place it in a card like Rules Lawyer */
.tk {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
}

.tk-card {
    background: rgba(18,19,22,.9);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
    border-radius: 18px;
    padding: 22px;
    backdrop-filter: blur(4px);
}

/* Header */
.tk-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.tk-title {
    font-size: clamp(22px, 3.2vw, 34px);
    margin: 0;
}

/* 2-col layout on wide */
.tk-wrap {
    display: grid;
    gap: 22px;
    align-items: start;
}

@media (min-width: 900px) {
    .tk-wrap {
        grid-template-columns: 520px 1fr;
    }
}

/* =============================
   Preview Stage
   ============================= */

.tk-stage {
    display: grid;
    gap: 10px;
}

/* Bright, solid stage background (no checkerboard) */
.tk-canvas {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 520px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.35);
    background: #f3f5f8; /* <<< bright solid */
}

    /* keep object-fit so images never stretch */
    .tk-canvas img {
        display: none; /* shown when loaded */
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

        .tk-canvas img.is-visible {
            display: block;
        }

.tk-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0 16px;
    text-align: center;
    color: #333; /* high contrast on bright bg */
    font-size: 14px;
    letter-spacing: .2px;
    text-shadow: none;
    pointer-events: none;
}

/* =============================
   Status Bar
   ============================= */

.tk-statusbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: #0f1115;
    color: #d6d7dd;
    font-size: 13px;
}

    .tk-statusbar .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #7b7d86;
        flex: 0 0 8px;
    }

    .tk-statusbar.ok .dot {
        background: #3cd07a;
    }

    .tk-statusbar.busy .dot {
        background: #f4c150;
    }

    .tk-statusbar.err .dot {
        background: #ff5c74;
    }

/* (If you keep your setStatus text node, just put it inside .tk-statusbar) */

/* =============================
   Form & Actions
   ============================= */

.tk-form {
    display: grid;
    gap: 12px;
}

.tk-input {
    min-height: 110px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.18);
    background: #121316;
    color: #f1f1f3;
}

    .tk-input::placeholder {
        color: #9b9ca4;
    }

/* Buttons row */
.tk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Primary (Generate) */
.tk-btn {
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(#e83d62,#b81b3e);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform .04s ease, filter .15s ease;
}

    .tk-btn:active {
        transform: translateY(1px);
    }

    .tk-btn[disabled] {
        opacity: .7;
        cursor: default;
    }

/* Ghost (Clear) */
.tk-btn-ghost {
    padding: 11px 16px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.18);
    color: #e5e6ea;
    font-weight: 600;
    cursor: pointer;
}

    .tk-btn-ghost:hover {
        background: rgba(255,255,255,.06);
    }

/* A tiny helper if you want a right-aligned status in the row */
.tk-actions .spacer {
    flex: 1;
}

/* Accessibility helper */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}



/* Spinner overlay inside the canvas */
.tk-spinner {
    position: absolute;
    inset: 0;
    display: none; /* JS toggles this */
    place-items: center;
    background: rgba(10,10,12,.28);
    backdrop-filter: blur(2px);
}

    .tk-spinner .ring {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        border: 3px solid rgba(255,255,255,.28);
        border-top-color: #fff;
        animation: tk-spin 0.8s linear infinite;
        box-shadow: 0 0 24px rgba(0,0,0,.25) inset;
    }

    .tk-spinner .time {
        margin-top: 10px;
        color: #fff;
        font-weight: 600;
        font-size: 13px;
        text-shadow: 0 1px 2px rgba(0,0,0,.35);
    }

@keyframes tk-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Image reveal (fade + de-blur) */
.tk-canvas img {
    opacity: 0;
    filter: blur(10px);
    transition: opacity .6s ease, filter .6s ease;
}

    .tk-canvas img.is-visible {
        opacity: 1;
    }

    .tk-canvas img.reveal {
        filter: blur(0);
    }


.tk-disclaimer {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #b9bac1;
}
