/* public/pages/listed/listed.css */
* {
    font-family: Arial, sans-serif;
}

/* Global box sizing */
*, *:before, *:after {
    box-sizing: border-box;
}

/* Prevent horizontal scroll on body/html */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Container for all content */
.content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}




/* Update the top navigation styles */
.top-nav {
    display: flex;
    justify-content: space-around;
    background: var(--tg-theme-secondary-bg-color);
    padding: 12px;
    /* Remove negative margins */
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    /* Add container styles */
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Update the content container */
.content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    /* Add padding to offset the header */
    padding: 0 8px; /* Add horizontal padding */
}

/* Update nav link styles to ensure they fit */
.nav-link {
    color: var(--tg-theme-hint-color);
    text-decoration: none;
    padding: 8px 12px; /* Slightly reduce padding */
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    text-align: center;
    flex: 1; /* Make links take equal space */
    margin: 0 4px; /* Add small margin between links */
}

/* Ensure nav links container stays within bounds */
.nav-link.active {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    /* No changes needed, inherits box-sizing */
}

/* Update all content below nav */
.content > *:not(.top-nav) {
    margin-top: 16px;
}
.collection-stats {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    padding: 16px;
    margin: 0 16px 16px 16px;
    position: relative;
}

.collection-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.collection-preview {
    width: 50px;
    height: 50px;
    position: relative;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.collection-info {
    flex: 1;
    min-width: 0;
}

.collection-title-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.collection-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
}

.details-btn {
    color: #2F80ED;
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
    font-size: 14px;
}

.stats-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stats-badge {
    padding: 4px 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.stats-badge-icon {
    font-size: 14px;
}

.stats-badge-value {
    font-weight: 500;
    font-size: 14px;
}

/* Different colors for different badges */
.stats-badge.price {
    background: rgba(157, 234, 190, 0.2);
}

.stats-badge.price .stats-badge-icon,
.stats-badge.price .stats-badge-value {
    color: rgb(75, 181, 120);
}

.stats-badge.points {
    background: rgba(144, 202, 249, 0.2);
}

.stats-badge.points .stats-badge-icon,
.stats-badge.points .stats-badge-value {
    color: rgb(66, 165, 245);
}

.stats-badge.count {
    background: rgba(255, 183, 77, 0.2);
}

.stats-badge.count .stats-badge-icon,
.stats-badge.count .stats-badge-value {
    color: rgb(255, 152, 0);
}

.stats-badge.supply {
    background: rgba(240, 98, 146, 0.15);
}

.stats-badge.supply .stats-badge-icon,
.stats-badge.supply .stats-badge-value {
    color: rgb(240, 98, 146);
}

/* Stats badge for average price */
.stats-badge.avg-price {
    background: rgba(255, 193, 7, 0.2);
}

.stats-badge.avg-price .stats-badge-icon,
.stats-badge.avg-price .stats-badge-value {
    color: rgb(255, 193, 7);
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-button {
    flex: 1;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-button.secondary {
    background: rgba(47, 128, 237, 0.1);
    color: #2F80ED;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.price-update-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(47, 128, 237, 0.1);
    border-radius: 8px;
}

.price-input-group label {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    white-space: nowrap;
}

.price-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--tg-theme-button-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    box-sizing: border-box;
}

.update-price-btn {
    height: 36px;
    width: 160px;
    padding: 0 16px;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

/* Lock toggle styles */
.lock-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--tg-theme-hint-color);
    font-size: 18px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lock-toggle.locked {
    color: #F44336;
}

/* Add this to the end of listed.css */

.no-collections {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    padding: 24px;
    margin: 16px;
    text-align: center;
}

.no-collections .message {
    margin: 0 0 16px 0;
    color: var(--tg-theme-text-color);
    font-size: 16px;
    line-height: 1.4;
}

.no-collections .help-text {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
    margin: 0;
}

/* Global floor price badge */
.stats-badge.global-price {
    background: rgba(147, 112, 219, 0.2);
}

.stats-badge.global-price .stats-badge-icon,
.stats-badge.global-price .stats-badge-value {
    color: rgb(147, 112, 219);
}


.action-buttons {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.action-button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
}

.action-button.secondary {
    background: rgba(47, 128, 237, 0.1);
    color: #2F80ED;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tooltip styles */
.stats-badge {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}


.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--tg-theme-bg-color);
    border: 1px solid var(--tg-theme-hint-color);
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    color: var(--tg-theme-text-color);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    pointer-events: none;
}

/* Show tooltip on hover for desktop */
@media (hover: hover) {
    .stats-badge:hover .tooltip-content {
        opacity: 1;
        visibility: visible;
    }
}

/* Show tooltip on click for mobile */
.stats-badge.tooltip-active .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* Active state styling */
.stats-badge.tooltip-active {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Welcome banner styling */
.welcome-banner {
    background: var(--tg-theme-secondary-bg-color);
    padding: 4px;
    text-align: center;
    margin: 0 6px;  /* Remove top margin, keep horizontal margins */
    border-radius: 10px;
}

.welcome-banner p {
    margin: 0;
    color: var(--tg-theme-text-color);
    font-size: 14px;
}

.bot-link {
    background: none;
    border: none;
    color: var(--tg-theme-button-color);
    font-weight: 500;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
}

.bot-link:hover {
    text-decoration: underline;
}

/* Update all content below nav */
.content > *:not(.top-nav) {
    margin-top: 2px;
}
