/**
 * Single Token Page - Block styles
 * Uses CSS variables (--neo-st-*) customized via Appearance → Customize
 */
.single-token-page {
    --neo-st-page-bg: #ffffff;
    --neo-st-block-bg: #f9fafb;
    --neo-st-text: #111827;
    --neo-st-heading: #111827;
    --neo-st-accent: #3b82f6;
    --neo-st-link: #3b82f6;
    --neo-st-border: #e5e7eb;
    --neo-st-font: inherit;
    --neo-st-heading-font: inherit;
    --neo-st-font-size: 16px;
    --neo-st-heading-size: 20px;
    --neo-st-title-size: 32px;
    --neo-st-block-padding: 28px;
    --neo-st-block-gap: 24px;
    --neo-st-radius: 12px;
    --neo-st-container: 1400px;
    --neo-st-btn-bg: #3b82f6;
    --neo-st-btn-text: #ffffff;
    --neo-st-btn-radius: 8px;
}

.single-token-page {
    font-family: var(--neo-st-font);
    font-size: var(--neo-st-font-size);
}

/* When using theme / Single Token Template Page: no plugin customizer, inherit from theme */
.single-token-page--theme-inherit,
.single-token-page--block-template {
    background: var(--wp--preset--color--background, var(--wp--custom--color--background, var(--global-color-background, inherit)));
    color: inherit;
    --neo-st-page-bg: transparent;
    --neo-st-block-bg: inherit;
    --neo-st-text: inherit;
    --neo-st-heading: inherit;
    --neo-st-accent: inherit;
    --neo-st-link: inherit;
    --neo-st-border: inherit;
    --neo-st-font: inherit;
    --neo-st-heading-font: inherit;
    --neo-st-btn-bg: inherit;
    --neo-st-btn-text: inherit;
}

.single-token-page:not(.single-token-page--theme-inherit) {
    padding: 40px 20px;
    min-height: 100vh;
    background: var(--neo-st-page-bg);
    color: var(--neo-st-text);
}

.single-token-page__blocks { display: block; }
.single-token-page__blocks > * { margin-bottom: 24px; }

.single-token-page .container {
    max-width: var(--neo-st-container);
    margin: 0 auto;
}

/* Prevent column/grid stretching that can create large empty space below short blocks */
.single-token-page .token-details-grid {
    align-items: start;
}

.single-token-page--block-template .wp-block-columns {
    align-items: flex-start;
}

.neo-token-block { padding: 0; }

.detail-box {
    padding: var(--neo-st-block-padding);
    border-radius: var(--neo-st-radius);
    margin-bottom: var(--neo-st-block-gap);
    background: var(--neo-st-block-bg);
    min-height: 160px;
}

/* Ownership & Report block should size to content (no forced card height) */
.detail-box.neo-ownership-report-box,
.single-token-page .detail-box.neo-ownership-report-box {
    min-height: auto;
}

/* Single-token card blocks: consistent min-height so layout stays stable when empty */
.single-token-page .neo-single-token-card,
.single-token-page .detail-box.neo-single-token-card {
    min-height: 160px;
}

/* Empty state area: reserve height so block does not collapse */
.single-token-page .neo-single-token-empty-state {
    min-height: 120px;
    display: flex;
    align-items: center;
}

/* YouTube / Chart empty state: larger placeholder so block does not collapse */
.single-token-page .neo-single-token-empty-state--media {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-box h2,
.detail-box h3 {
    margin: 0 0 20px 0;
    font-size: var(--neo-st-heading-size);
    font-weight: 600;
    font-family: var(--neo-st-heading-font);
    color: var(--block-heading-color, var(--neo-st-heading));
}

.token-description { line-height: 1.8; }

.info-table { width: 100%; border-collapse: collapse; }

.info-table tr { border-bottom: 1px solid var(--neo-st-border); }

.info-table th {
    text-align: left;
    padding: 14px 16px 14px 0;
    width: 180px;
    font-weight: 600;
}

.info-table td { padding: 14px 0; }

.contract-address {
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    word-break: break-all;
}

.copy-btn {
    margin-left: 10px;
    padding: 6px 14px;
    border-radius: var(--neo-st-btn-radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.quick-links,
.social-links { display: flex; flex-direction: column; gap: 12px; }

.link-btn,
.social-btn {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    border-radius: var(--neo-st-btn-radius);
    text-align: center;
    font-weight: 600;
    font-size: var(--neo-st-font-size);
    border: none;
    background: var(--neo-st-btn-bg);
    color: var(--neo-st-btn-text);
    width: 100%;
    cursor: pointer;
}

.link-btn:hover,
.social-btn:hover {
    opacity: 0.9;
}

.token-single-header {
    padding: var(--neo-st-block-padding);
    border-radius: var(--neo-st-radius);
    margin-bottom: var(--neo-st-block-gap);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    background: var(--neo-st-block-bg);
}

.token-main-info { display: flex; gap: 24px; flex: 1; min-width: 0; align-items: center; }

.neo-token-header .neo-token-header-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.token-logo-large img,
.token-logo-large .neo-token-header-icon-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Token header: icon + chain overlay (template part defaults) */
.neo-token-header .token-logo-large.neo-token-header-icon-wrap {
    width: 120px;
    height: 120px;
    position: relative;
    flex-shrink: 0;
}
.neo-token-header .neo-token-header-icon-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
}
.neo-token-header .neo-chain-overlay.neo-token-header-chain-overlay {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--neo-st-block-bg, #f9fafb);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.neo-token-header .neo-chain-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.neo-token-header .neo-token-header-name-line {
    margin-bottom: 8px;
}
.neo-token-header .neo-token-header-name-line .token-title {
    margin: 0;
}
.neo-token-header .neo-token-header-status-category {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 16px;
}
.neo-token-header .neo-token-header-audit-kyc span,
.neo-token-header .neo-token-header-audit-kyc a {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
}
.neo-token-header .badge-audit,
.neo-token-header .neo-token-header-audit-kyc .badge-audit { background-color: #dbeafe; color: #0369a1; }
.neo-token-header .badge-kyc,
.neo-token-header .neo-token-header-audit-kyc .badge-kyc { background-color: #dcfce7; color: #166534; }
.neo-token-header .badge-locked { background-color: #fef3c7; color: #92400e; }
.neo-token-header .badge-status { font-size: 12px; background-color: #f3f4f6; color: #374151; padding: 3px 8px; border-radius: 4px; }
.neo-token-header .badge-category { font-size: 12px; color: #1f2937; padding: 3px 8px; border-radius: 4px; }
.neo-token-header .neo-token-header-separator { display: inline-block; width: 1px; height: 16px; margin: 0 6px; vertical-align: middle; border-left: 1px solid #e5e7eb; }
.neo-token-header .neo-token-header-action-buttons { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; z-index: 10; }
.neo-token-header .neo-token-header-action-buttons button,
.neo-token-header .neo-token-header-action-buttons a.neo-token-header-action-btn { width: 24px; height: 24px; padding: 0; border: none; background: transparent; cursor: pointer; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.neo-token-header .neo-token-header-action-buttons button:hover,
.neo-token-header .neo-token-header-action-buttons a.neo-token-header-action-btn:hover { background: rgba(0,0,0,0.05); }
.neo-token-header .neo-token-header-action-buttons .neo-watchlist-btn,
.neo-token-header .neo-token-header-action-buttons .neo-token-header-share-btn,
.neo-token-header .neo-token-header-action-buttons .neo-watchlist-btn:hover,
.neo-token-header .neo-token-header-action-buttons .neo-token-header-share-btn:hover,
.neo-token-header .neo-token-header-action-buttons .neo-watchlist-btn:focus,
.neo-token-header .neo-token-header-action-buttons .neo-token-header-share-btn:focus,
.neo-token-header .neo-token-header-action-buttons .neo-watchlist-btn:active,
.neo-token-header .neo-token-header-action-buttons .neo-token-header-share-btn:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
}
.neo-token-header .neo-token-header-action-buttons .neo-watchlist-btn img,
.neo-token-header .neo-token-header-action-buttons .neo-token-header-share-btn img {
    display: block;
    background: transparent !important;
}
.neo-token-header .neo-token-header-contract { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.neo-token-header .neo-token-header-contract-address { font-size: 13px; color: #6b7280; font-family: monospace; word-break: break-all; }
.neo-token-header .neo-token-header-copy-btn { font-size: 12px; padding: 4px 10px; border-radius: 6px; background: #f3f4f6; color: #374151; border: none; cursor: pointer; font-weight: 600; }

/* Link buttons row (Telegram, X, Discord, etc.) */
.neo-token-header .neo-token-header-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}
.neo-token-header .neo-token-header-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
    background: var(--neo-st-btn-bg, #3b82f6);
    color: var(--neo-st-btn-text, #ffffff);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.neo-token-header .neo-token-header-link-btn:hover {
    background: #2563eb;
    color: #ffffff;
    opacity: 0.95;
}
.neo-token-header .neo-token-header-link-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.neo-token-header .neo-token-header-links.neo-token-header-links--icon-only .neo-token-header-link-btn {
    padding-left: 10px;
    padding-right: 10px;
}

.token-title {
    margin: 0 0 16px 0;
    font-size: var(--neo-st-title-size);
    font-weight: 700;
    font-family: var(--neo-st-heading-font);
    color: var(--neo-st-heading);
}

.token-symbol { font-size: 24px; opacity: 0.7; }

.token-meta { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.voting-box {
    padding: 30px;
    border-radius: var(--neo-st-radius);
    text-align: center;
    min-width: 280px;
    flex-shrink: 0;
    background: var(--neo-st-block-bg);
}

.vote-count { display: flex; justify-content: space-around; margin-bottom: 24px; }

.vote-number { font-size: 36px; font-weight: 700; }

.btn-vote-large {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--neo-st-btn-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: var(--neo-st-btn-bg);
    color: var(--neo-st-btn-text);
}

.tokenomics-chart-wrapper { max-width: 300px; margin: 0 auto 20px; }

.tokenomics-legend { list-style: none; padding: 0; margin: 0; }

.tokenomics-legend li { padding: 6px 0; }

.neo-faq-question {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: var(--neo-st-block-bg);
    border: 1px solid var(--neo-st-border);
    border-radius: var(--neo-st-radius);
    font-size: var(--neo-st-font-size);
    font-weight: 600;
    cursor: pointer;
    color: var(--neo-st-heading);
}

.neo-faq-answer {
    padding: 16px;
    margin-top: 8px;
    border-radius: var(--neo-st-radius);
    background: var(--neo-st-block-bg);
}

.progress-bar-wrap {
    height: 8px;
    background: var(--neo-st-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--neo-st-accent);
    transition: width 0.3s;
}

.chart-embed-wrap iframe { border-radius: var(--neo-st-radius); }

/* Links inside content */
.single-token-page a { color: var(--neo-st-link); }

.single-token-page a:hover { opacity: 0.85; }

/* Back button */
.btn-back {
    color: var(--neo-st-link);
}

/* Token header - mobile: column layout, action buttons in-flow */
@media (max-width: 768px) {
    .token-single-header.neo-token-header {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 12px;
        gap: 20px;
    }
    .neo-token-header .token-main-info {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .neo-token-header .neo-token-header-action-buttons {
        position: static;
        margin-left: auto;
        top: auto;
        right: auto;
        gap: 8px;
    }
    .neo-token-header .neo-token-header-action-buttons button,
    .neo-token-header .neo-token-header-action-buttons a.neo-token-header-action-btn {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }
    .neo-token-header .neo-token-header-status-category {
        flex-wrap: wrap;
    }
    .neo-token-header .neo-token-header-contract,
    .neo-token-header .neo-token-header-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .neo-token-header .token-logo-large.neo-token-header-icon-wrap,
    .neo-token-header .neo-token-header-icon-wrap {
        width: 80px !important;
        height: 80px !important;
        flex-shrink: 0;
    }
    .neo-token-header .neo-chain-overlay.neo-token-header-chain-overlay {
        width: 22px !important;
        height: 22px !important;
    }
    .neo-token-header .token-title {
        font-size: clamp(18px, 5vw, 24px);
    }
    .neo-token-header .token-symbol {
        font-size: 1em;
    }
    .neo-token-header .neo-token-header-contract {
        gap: 8px;
    }
    .neo-token-header .neo-token-header-contract-address {
        font-size: 12px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .neo-token-header .neo-token-header-copy-btn {
        flex-shrink: 0;
        min-height: 36px;
        padding: 8px 12px;
    }
    .neo-token-header .neo-token-header-links {
        gap: 6px;
    }
    .neo-token-header .neo-token-header-link-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px 12px;
    }
    .neo-token-header .neo-token-header-links.neo-token-header-links--icon-only .neo-token-header-link-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    .token-single-header .voting-box {
        min-width: 0;
        width: 100%;
        padding: 20px 16px;
        order: 999;
    }
    .token-single-header .btn-vote-large {
        width: 100%;
        min-height: 48px;
    }
}
@media (max-width: 480px) {
    .token-single-header.neo-token-header {
        padding: 12px 10px;
    }
    .neo-token-header .token-logo-large.neo-token-header-icon-wrap,
    .neo-token-header .neo-token-header-icon-wrap {
        width: 64px !important;
        height: 64px !important;
    }
    .neo-token-header .neo-chain-overlay.neo-token-header-chain-overlay {
        width: 18px !important;
        height: 18px !important;
    }
}
