/* Bans Page Styles */
.bans-container {
    margin-top: 4%;
    padding: 0 20px;
}

.bans-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.bans-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bans-title i {
    color: #dc2626;
}

.bans-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.bans-filter-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 3px;
}

.bans-filter-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.bans-filter-tab:hover {
    color: #fff;
}

.bans-filter-tab.active {
    background: rgba(255, 209, 0, 0.2);
    color: #ffd100;
}

.bans-search {
    position: relative;
}

.bans-search input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 15px 10px 40px;
    color: #fff;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.2s ease;
}

.bans-search input:focus {
    outline: none;
    border-color: rgba(255, 209, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.bans-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.bans-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
}

/* Stats Boxes */
.bans-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto 55px;
}

.bans-stat-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.bans-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.bans-stat-icon.active {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

.bans-stat-icon.expired {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.bans-stat-icon.total {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.bans-stat-icon.permanent {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.bans-stat-content {
    display: flex;
    flex-direction: column;
}

.bans-stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.bans-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table */
.bans-table-wrapper {
    max-width: 1200px;
    margin: 15px auto 0;
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#gw_bans {
    width: 100%;
    margin: 0;
}

#gw_bans thead th {
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#gw_bans tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#gw_bans tbody tr {
    transition: background 0.15s ease;
}

#gw_bans tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Ban Player Cell */
.ban-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ban-player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.ban-player-info {
    display: flex;
    flex-direction: column;
}

.ban-player-name {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ban-player-name:hover {
    color: #ffd100;
}

.ban-player-steamid {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Sono', monospace;
}

/* Ban Reason */
.ban-reason {
    max-width: 250px;
}

.ban-reason > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ban-edit-note {
    font-size: 0.7rem;
    color: #ffd100;
    margin-top: 4px;
    font-style: italic;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ban-edit-note i {
    margin-right: 4px;
    font-size: 0.65rem;
}

.ban-admin {
    color: rgba(255, 255, 255, 0.7);
}

.ban-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Ban Status */
.ban-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ban-status.active {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

.ban-status.permanent {
    background: rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

.ban-status.expired {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.ban-time {
    font-family: 'Sono', monospace;
    font-size: 0.85rem;
}

/* Actions */
.ban-actions {
    display: flex;
    gap: 6px;
}

.btn-history {
    background: rgba(255, 209, 0, 0.15);
    border: 1px solid rgba(255, 209, 0, 0.3);
    color: #ffd100;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-history:hover {
    background: rgba(255, 209, 0, 0.25);
    border-color: rgba(255, 209, 0, 0.5);
}

.btn-history:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* History Modal */
#banHistoryModal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid rgba(251, 191, 36, 0.6);
    padding: 12px 16px;
}

.history-item.history-unbanned {
    border-left-color: rgba(74, 222, 128, 0.6);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.history-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.history-badge-edited {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.history-badge-unbanned {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.history-admin {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.history-time {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-left: auto;
}

.history-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-change-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
}

.history-change-row.single-col {
    grid-template-columns: 1fr;
}

.history-change-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.history-change-old {
    color: #f87171;
    word-break: break-word;
    font-size: 0.9rem;
}

.history-change-arrow {
    color: rgba(255, 255, 255, 0.3);
    padding-top: 18px;
}

.history-change-new {
    color: #4ade80;
    word-break: break-word;
    font-size: 0.9rem;
}

.history-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 30px 20px;
}

.history-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    color: rgba(255, 255, 255, 0.3);
}

.history-note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(255, 209, 0, 0.1);
    border-radius: 4px;
    border-left: 2px solid #ffd100;
}

.history-note i {
    margin-right: 6px;
    color: #ffd100;
}

/* DataTables overrides */
.dataTables_wrapper .dataTables_paginate {
    padding: 15px;
}

.dataTables_wrapper .dataTables_info {
    padding: 15px;
    color: rgba(255, 255, 255, 0.5);
}

.dataTables_empty {
    padding: 40px !important;
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bans-container {
        margin-top: 60px;
        padding: 0 10px;
    }

    .bans-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .bans-stat-box {
        padding: 12px 14px;
        gap: 10px;
    }

    .bans-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .bans-stat-value {
        font-size: 1.1rem;
    }

    .bans-stat-label {
        font-size: 0.7rem;
    }

    .bans-header {
        flex-direction: column;
        align-items: stretch;
    }

    .bans-title {
        font-size: 1.2rem;
    }

    .bans-controls {
        flex-direction: column;
    }

    .bans-search input {
        width: 100%;
    }

    .ban-reason {
        max-width: 100px;
        font-size: 0.75rem;
    }

    .ban-player-steamid {
        display: none;
    }

    .ban-player-avatar {
        display: none !important;
    }

    .ban-player {
        gap: 0;
    }

    .ban-player-name {
        font-size: 0.85rem;
    }

    .ban-admin {
        font-size: 0.75rem;
    }

    .ban-date {
        font-size: 0.75rem;
    }

    .ban-status {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    #gw_bans thead th {
        padding: 10px 8px;
        font-size: 0.7rem;
    }

    #gw_bans tbody td {
        padding: 8px;
    }

    #gw_bans thead th:nth-child(6),
    #gw_bans tbody td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 480px) {
    #gw_bans thead th:nth-child(3),
    #gw_bans tbody td:nth-child(3),
    #gw_bans thead th:nth-child(4),
    #gw_bans tbody td:nth-child(4) {
        display: none;
    }
}

@media (min-width: 769px) {
    #gw_bans thead th:nth-child(6),
    #gw_bans tbody td:nth-child(6) {
        display: table-cell;
    }
}
