/* Unified Wiki Page Styles for Ammunition, Magazines, and Attachments */
/* Based on Firearms Wiki Design */

/* Source Badge Styles - Matching Firearms Wiki */
.badge-vanilla {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-modded {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Unified Table Styles - Matching Firearms Wiki */
.wikitable {
    width: 100%;
    background: rgba(35, 50, 75, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.wikitable thead {
    background: rgba(59, 130, 246, 0.2);
}

.wikitable th {
    padding: 12px 16px;
    text-align: left;
    color: #93c5fd;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    user-select: none;
    position: relative;
}

.wikitable th.headerSort:hover {
    background: rgba(59, 130, 246, 0.3);
}

.wikitable th.headerSort::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    opacity: 0.3;
}

.wikitable th.headerSortUp::after {
    content: '↑';
    opacity: 1;
}

.wikitable th.headerSortDown::after {
    content: '↓';
    opacity: 1;
}

.wikitable td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
}

.wikitable tbody tr:hover {
    background: rgba(45, 65, 95, 0.6);
}

.wikitable tbody tr:last-child td {
    border-bottom: none;
}

/* Overflow Wrapper - Matching Firearms Wiki */
.overflow-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling */
.overflow-wrapper::-webkit-scrollbar {
    height: 8px;
}

.overflow-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.overflow-wrapper::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.5);
    border-radius: 4px;
}

.overflow-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.7);
}

/* Content Section - Matching Firearms Wiki */
.wiki-content-section {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgb(55, 65, 81);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.wiki-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

/* Unified Filter Controls */
.wiki-filter-controls {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(75, 85, 99, 1);
}

/* Unified Loading State */
.wiki-loading {
    text-align: center;
    padding: 3rem 0;
}

.wiki-loading-spinner {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 2px solid transparent;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Unified Error State */
.wiki-error {
    background: rgba(127, 29, 29, 0.2);
    border: 1px solid #ef4444;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.wiki-error-text {
    color: #fca5a5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wikitable {
        font-size: 0.875rem;
    }
    
    .wikitable th,
    .wikitable td {
        padding: 10px 12px;
    }
    
    .badge-vanilla,
    .badge-modded {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}
