/* ========================================
   Token creation: the card previews the token, the panel holds the form
   (the same layout as the staking screen; colours and radii from style.css)
   ======================================== */
.token-card.jetton-create-card {
    --card-tone: linear-gradient(145deg, #6E3FC2 0%, #5A2FA6 50%, #3F2079 100%);
    --card-glow: rgba(80, 40, 150, 0.7);
}

.jetton-preview {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 14px;
    background: rgba(3, 20, 50, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-md);
}

.jetton-preview-label {
    font-size: 13px;
    opacity: 0.92;
}

.jetton-preview-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.jetton-preview-icon {
    display: flex;
    flex-shrink: 0;
}

.jetton-preview-icon .token-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jetton-preview-names {
    display: grid;
    min-width: 0;
}

.jetton-preview-name {
    overflow: hidden;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
}

.jetton-preview-symbol {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: 0.92;
}

.jetton-preview-supply {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

/* Fixed or not: on the card, as holders will judge the token */
.jetton-preview-badge {
    justify-self: start;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #D7F8E6;
    background: rgba(3, 20, 40, 0.34);
    border-radius: 999px;
}

.jetton-preview-badge.is-warning {
    color: #FFDC94;
}

.jetton-create-panel {
    min-width: 0;
    margin-top: 20px;
}

/* Ticker and decimals side by side; the labels may wrap on small phones */
.jetton-create-pair {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    column-gap: 12px;
    align-items: end;
}

.jetton-description {
    min-height: 92px;
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
}

/* The native file input stays in the tab order but invisible; its label is the button */
.jetton-image-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    min-width: 0;
}

.jetton-image-pick {
    position: relative;
    min-height: 44px;
    padding: 0 16px;
    cursor: pointer;
}

.jetton-image-pick:has(.jetton-image-input:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.jetton-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.jetton-image-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    color: var(--ink-2);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.jetton-image-field .link-button {
    min-height: 44px;
}

/* Fixed supply: a switch on a card like the staking payout choices */
.jetton-switch {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 4px 0 14px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
}

.jetton-switch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.jetton-switch-track {
    position: relative;
    width: 44px;
    height: 26px;
    margin-top: 1px;
    background: var(--ink-3);
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

.jetton-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(14, 34, 51, 0.3);
    transition: transform 0.15s var(--ease-out);
}

.jetton-switch-input:checked + .jetton-switch-track {
    background: var(--ton);
}

.jetton-switch-input:checked + .jetton-switch-track::after {
    transform: translateX(18px);
}

.jetton-switch-input:focus-visible + .jetton-switch-track {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.jetton-switch-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.jetton-switch-title {
    font-size: 15px;
    font-weight: 600;
}

.jetton-switch-hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-2);
}

.jetton-create-cost {
    margin-bottom: 14px;
    background: var(--surface);
}

/* The result of a creation: the new token's address with a copy button */
.result-minter {
    display: grid;
    gap: 6px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 20px;
    padding: 12px 14px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.result-minter-label {
    font-size: 13px;
    color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
    .jetton-switch-track,
    .jetton-switch-track::after {
        transition: none;
    }
}

/* Wide screens: the preview stays beside the form */
@media (min-width: 960px) {
    #jettonCreateScreen.screen {
        max-width: 940px;
    }

    .jetton-create-layout {
        display: grid;
        grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
        align-items: start;
        gap: 28px;
    }

    .jetton-create-summary {
        position: sticky;
        top: 92px; /* like .staking-summary */
    }

    .jetton-create-panel {
        margin-top: 0;
    }
}

@media (min-width: 1200px) {
    #app.has-wallet-chrome .jetton-create-summary {
        top: 0;
    }
}
