/**
 * Frontend Base Styles for Geo Ranking Tables
 * Shared styles across all themes (loading, fallback, utilities)
 */

/* Main Wrapper */
.grt-ranking-table-wrapper {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Loading State */
.grt-table-loading {
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
}

.grt-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: grt-spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes grt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fallback State */
.grt-table-fallback {
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
}

.grt-fallback-message h4 {
    color: #d32f2f;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.grt-fallback-message p {
    color: #666;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

/* No Sites/Results Messages */
.grt-no-sites {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.grt-no-results {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Content Container */
.grt-table-content {
    padding: 0;
}

.grt-sites-table {
    width: 100%;
}

/* Star Rating (shared) */
.grt-stars {
    display: flex;
    gap: 2px;
}

.grt-star {
    font-size: 1.2em;
}

.grt-star-full {
    color: #ffd700;
}

.grt-star-half {
    color: #ffd700;
    position: relative;
}

.grt-star-half::after {
    content: '\2606';
    position: absolute;
    left: 50%;
    color: #ddd;
}

.grt-star-empty {
    color: #ddd;
}

/* Pros/Cons Lists (shared) */
.grt-pros-list,
.grt-cons-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.grt-pro-item,
.grt-con-item {
    margin-bottom: 6px;
    font-size: 0.9em;
    line-height: 1.4;
}

.grt-checkmark {
    color: #4caf50;
    font-weight: bold;
    margin-right: 6px;
}

.grt-xmark {
    color: #f44336;
    font-weight: bold;
    margin-right: 6px;
}

/* Logo Fallback Initial */
.grt-site-initial {
    width: 60px;
    height: 60px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
}

/* Base Responsive */
@media (max-width: 480px) {
    .grt-ranking-table-wrapper {
        margin: 10px 0;
        border-radius: 4px;
    }
}
