/* ========================================
   RANKING WIDGET STYLES
   ======================================== */

/* Sidebar FIXED - TOP 10 Vendedores */
.top-sellers-sidebar-fixed {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    z-index: 1000;
    border-radius: 16px;
    background: transparent !important;
    border: none !important;
}

.top-sellers-widget {
    background: var(--theme-ranking-card-bg, #2c3e50);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    border: none !important;
    transition: all 0.3s ease;
    outline: none !important;
    background-clip: padding-box;
    clip-path: inset(0 round 16px);
    mask-image: radial-gradient(circle, #000 99.9%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, #000 99.9%, transparent 100%);
}

.top-sellers-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.widget-header {
    background: transparent !important;
    color: var(--theme-ranking-card-text, #ffffff);
    padding: 20px;
    border-radius: 0;
    text-align: center;
    border-bottom: none !important;
}

.widget-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--theme-ranking-card-text, #ffffff);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.widget-header p {
    margin: 8px 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--theme-ranking-card-text, #ffffff);
}

.widget-body {
    background: transparent !important;
    border-radius: 0;
    overflow: hidden;
}

.seller-item {
    padding: 15px 20px;
    border-bottom: none !important;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--theme-ranking-card-bg, #2c3e50);
}

/* REMOVER QUALQUER BORDA/CONTOURNO DOS ELEMENTOS INTERNOS */
.seller-link,
.seller-item > *,
.seller-avatar, .seller-avatar img, .seller-avatar div,
.seller-info, .seller-info > div,
.seller-revenue, .seller-revenue > div {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

.seller-item:last-child {
    border-bottom: none !important;
}

.seller-item:hover {
    background: var(--theme-category-card-hover, #34495e);
}

.seller-rank {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seller-rank i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.seller-rank.gold { color: #FFD700; }
.seller-rank.silver { color: #C0C0C0; }
.seller-rank.bronze { color: #CD7F32; }
.seller-rank.other { 
    color: var(--theme-ranking-card-text, #999);
    opacity: 0.8;
}

.seller-avatar {
    flex-shrink: 0;
}

.seller-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: none !important;
    box-shadow: none !important;
}

.seller-avatar div {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-primary, #2563eb), var(--theme-primary-dark, #1d4ed8));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: none !important;
}

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

.seller-info div:first-child {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--theme-ranking-card-text, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.seller-info div:last-child {
    font-size: 0.75rem;
    color: var(--theme-ranking-card-text, #ffffff);
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.seller-info div:last-child i {
    font-size: 0.7rem;
}

.seller-revenue {
    text-align: right;
    margin-left: 5px;
}

.seller-revenue div {
    font-size: 0.85rem;
    font-weight: 700;
    color: #10b981;
    white-space: nowrap;
}

/* Footer do Widget */
.widget-footer {
    background: transparent !important;
    padding: 12px 20px;
    text-align: center;
    border-top: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.widget-footer small {
    color: var(--theme-ranking-card-text, #ffffff);
    font-weight: 500;
    opacity: 0.8;
    font-size: 0.8rem;
}

.widget-footer i {
    color: var(--theme-ranking-card-text, #ffffff);
    opacity: 0.9;
}

/* Botão Flutuante Mobile - TOP 10 */
.btn-floating-ranking {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--theme-ranking-card-bg, #2c3e50);
    border: 3px solid var(--theme-ranking-card-border, #34495e);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-floating-ranking:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.btn-floating-ranking:active {
    transform: translateY(0) scale(0.98);
}

.btn-floating-ranking i {
    color: var(--theme-ranking-card-text, #ffffff);
    font-size: 1.5rem;
}

/* Modal Mobile - TOP 10 */
#rankingModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
}

#rankingModal > div {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--theme-ranking-card-bg, #2c3e50);
    border-radius: 20px 20px 0 0;
    max-height: calc(85vh - 80px); /* Reduzido para compensar bottom nav */
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    border: 3px solid var(--theme-ranking-card-border, #34495e);
    box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
    padding-bottom: 80px; /* Espaço para bottom nav (60px + 20px margem) */
    margin-bottom: 0;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--theme-ranking-card-border, #34495e);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--theme-ranking-card-bg, #2c3e50);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    color: var(--theme-ranking-card-text, #ffffff);
    font-size: 1.4rem;
    font-weight: 700;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--theme-ranking-card-text, #ffffff);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 5px;
    line-height: 1;
}

.modal-header button:hover {
    opacity: 1;
}

.modal-body {
    padding: 0;
}

/* Estilo para quando o modal estiver aberto */
body.modal-open {
    overflow: hidden;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.seller-item {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

/* ========================================
   MOBILE - AJUSTE PARA BOTTOM NAV BAR
   ======================================== */
@media (max-width: 768px) {
    #rankingModal > div {
        padding-bottom: 80px !important;
        max-height: calc(85vh - 80px) !important;
    }

    .modal-body {
        padding-bottom: 0 !important;
    }
}

/* Atraso para cada item do ranking */
.seller-item:nth-child(1) { animation-delay: 0.1s; }
.seller-item:nth-child(2) { animation-delay: 0.15s; }
.seller-item:nth-child(3) { animation-delay: 0.2s; }
.seller-item:nth-child(4) { animation-delay: 0.25s; }
.seller-item:nth-child(5) { animation-delay: 0.3s; }
.seller-item:nth-child(6) { animation-delay: 0.35s; }
.seller-item:nth-child(7) { animation-delay: 0.4s; }
.seller-item:nth-child(8) { animation-delay: 0.45s; }
.seller-item:nth-child(9) { animation-delay: 0.5s; }
.seller-item:nth-child(10) { animation-delay: 0.55s; }
