/* Top Cities Visitor Stats - Frontend Styles */

.tcvs-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.tcvs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.tcvs-title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tcvs-title {
    margin: 0;
    font-size: 1.5em;
    color: #333;
    font-weight: 600;
}

.tcvs-post-title {
    font-size: 0.9em;
    color: #666;
    font-weight: 400;
    font-style: italic;
}

.tcvs-period {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.tcvs-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tcvs-stat-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tcvs-stat-item:hover {
    background: #f5f5f5;
    transform: translateX(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tcvs-rank {
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2em;
}

.tcvs-medal {
    font-size: 1.8em;
}

.tcvs-number {
    color: #666;
}

.tcvs-city-info {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tcvs-city-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05em;
    color: #333;
}

.tcvs-flag {
    font-size: 1.3em;
    line-height: 1;
}

.tcvs-region {
    color: #666;
    font-weight: 400;
    font-size: 0.95em;
}

.tcvs-stats-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.9em;
    color: #555;
}

.tcvs-visitors,
.tcvs-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tcvs-separator {
    color: #ccc;
}

.tcvs-percentage {
    background: #1976d2;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85em;
}

.tcvs-bar-container {
    grid-column: 2;
    grid-row: 2;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.tcvs-bar {
    height: 100%;
    background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.tcvs-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #666;
}

.tcvs-no-data {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

/* Esquemas de color */

/* Verde */
.tcvs-scheme-green .tcvs-period {
    background: #e8f5e9;
    color: #388e3c;
}

.tcvs-scheme-green .tcvs-percentage {
    background: #388e3c;
}

.tcvs-scheme-green .tcvs-bar {
    background: linear-gradient(90deg, #388e3c 0%, #66bb6a 100%);
}

/* Naranja */
.tcvs-scheme-orange .tcvs-period {
    background: #fff3e0;
    color: #f57c00;
}

.tcvs-scheme-orange .tcvs-percentage {
    background: #f57c00;
}

.tcvs-scheme-orange .tcvs-bar {
    background: linear-gradient(90deg, #f57c00 0%, #ffa726 100%);
}

/* Morado */
.tcvs-scheme-purple .tcvs-period {
    background: #f3e5f5;
    color: #7b1fa2;
}

.tcvs-scheme-purple .tcvs-percentage {
    background: #7b1fa2;
}

.tcvs-scheme-purple .tcvs-bar {
    background: linear-gradient(90deg, #7b1fa2 0%, #ab47bc 100%);
}

/* Oscuro */
.tcvs-scheme-dark .tcvs-container {
    background: #2c2c2c;
    color: #fff;
}

.tcvs-scheme-dark .tcvs-title {
    color: #fff;
}

.tcvs-scheme-dark .tcvs-post-title {
    color: #aaa;
}

.tcvs-scheme-dark .tcvs-period {
    background: #424242;
    color: #64b5f6;
}

.tcvs-scheme-dark .tcvs-stat-item {
    background: #363636;
}

.tcvs-scheme-dark .tcvs-stat-item:hover {
    background: #404040;
}

.tcvs-scheme-dark .tcvs-city-name {
    color: #fff;
}

.tcvs-scheme-dark .tcvs-region {
    color: #bbb;
}

.tcvs-scheme-dark .tcvs-stats-numbers {
    color: #ccc;
}

.tcvs-scheme-dark .tcvs-bar-container {
    background: #555;
}

.tcvs-scheme-dark .tcvs-footer {
    border-top-color: #555;
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .tcvs-container {
        padding: 16px;
    }
    
    .tcvs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tcvs-title {
        font-size: 1.3em;
    }
    
    .tcvs-post-title {
        font-size: 0.85em;
    }
    
    .tcvs-stat-item {
        grid-template-columns: 35px 1fr;
    }
    
    .tcvs-rank {
        font-size: 1em;
    }
    
    .tcvs-medal {
        font-size: 1.5em;
    }
    
    .tcvs-city-name {
        font-size: 1em;
    }
    
    .tcvs-stats-numbers {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .tcvs-stats-numbers {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .tcvs-separator {
        display: none;
    }
}
