/* Monitoring Module Styles for Lithium Theme */

/* ===== PRIMARY COLOR ===== */
:root {
    --mon-primary: #10b981;
    --mon-primary-hover: #059669;
}

/* ===== CATEGORY SELECT ===== */
.category-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--mon-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary, #fff);
    background: transparent;
}

.category-item:hover {
    background: rgba(16, 185, 129, 0.1);
}

.category-item.selected,
.category-item:has(input:checked) {
    background: var(--mon-primary);
    color: #000;
}

.category-item input {
    display: none;
}

/* ===== DESCRIPTION BOX ===== */
.mon-description {
    background: var(--background-secondary, #f8f9fa);
    padding: 1.25rem;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: -1px;
    color: var(--text-primary, inherit);
    line-height: 1.6;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mon-description * {
    max-width: 100%;
}

.mon-description ul,
.mon-description ol {
    margin: 0;
    padding-left: 1.25rem;
}

.mon-description li {
    margin-bottom: 0.25rem;
}

.mon-description p {
    margin-bottom: 0.5rem;
}

.mon-description p:last-child {
    margin-bottom: 0;
}

.mon-description table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    table-layout: fixed;
    display: block;
    overflow-x: auto;
    max-width: 100%;
}

.mon-description td,
.mon-description th {
    padding: 0.5rem;
    border: 1px solid var(--divider, #dee2e6);
    vertical-align: top;
    word-break: break-word;
}

.mon-description img {
    max-width: 100%;
    height: auto;
}

.mon-description::after {
    content: "";
    display: table;
    clear: both;
}

.mon-description [style*="column"],
.mon-description [style*="float"] {
    float: none !important;
    column-count: unset !important;
    columns: unset !important;
}

.col-lg-8 .card {
    overflow: hidden;
}

/* ===== TOAST ===== */
.mon-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: var(--mon-primary);
    color: #000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== SERVER CARDS ===== */
@keyframes neon-glow {
    0% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 0 40px rgba(16, 185, 129, 0.5);
    }
}

.server-map {
    color: var(--text-primary, inherit);
    background: var(--background-primary, #fff);
    width: 100%;
    height: 100px;
    padding: 20px 12px 20px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--mon-primary);
    border-radius: 8px;
    margin-bottom: 5px;
    margin-top: 5px;
}

.server-map.sponsor-server {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
    animation: neon-glow 1.5s infinite alternate;
}

.server-stats-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 22%;
    flex-shrink: 0;
    overflow: hidden;
    justify-content: center;
}

.server-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.server-avatar {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
}

.server-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.server-info {
    width: 15%;
    display: flex;
    flex-direction: column;
    align-items: start !important;
    height: 100%;
    flex-shrink: 0;
    min-width: 0;
}

.server-info a {
    text-decoration: none;
    color: inherit;
}

.server-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, inherit);
    margin-bottom: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.server-ip {
    font-size: 14px;
    color: var(--text-secondary, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-stats {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
    flex-wrap: nowrap;
    min-width: 0;
}

.stat-badge {
    background: var(--secondary, #e9ecef);
    color: var(--text-primary, #212529);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 4px;
}

.stat-badge.version {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--mon-primary);
    color: var(--text-primary, #fff);
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: auto;
    border-radius: 4px;
}

.stat-badge.success-verification {
    background-color: transparent;
    color: var(--mon-primary);
    font-size: 16px;
    padding: 2px;
}

.stat-badge.warning-verification {
    background-color: transparent;
    color: #dc3545;
    font-size: 16px;
    padding: 2px;
}

.stat-badge.sponsor {
    background-color: transparent;
    color: gold;
    font-size: 16px;
    padding: 2px;
}

.stat-badge.java-bedrock {
    background-color: var(--mon-primary);
    color: #000000;
    font-size: 10px;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 85px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--mon-primary);
}

.status-indicator.offline {
    background-color: #dc3545;
}

.online-text {
    min-width: 45px;
    color: var(--text-primary, inherit);
    font-weight: 500;
    white-space: nowrap;
}

.server-tags {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    min-width: 0;
    min-height: 24px;
}

.tag {
    background-color: transparent;
    color: var(--text-primary, inherit);
    padding: 4px 8px;
    border: 1px solid var(--mon-primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.tag.last {
    background-color: rgba(16, 185, 129, 0.08);
    flex-shrink: 0;
    max-width: none;
    overflow: visible;
    margin-left: auto;
}

.copy-buttons {
    width: 180px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.copy-ip-btn-group {
    display: flex;
    width: 100%;
    flex-direction: row;
    gap: 4px;
}

.copy-ip-btn-group .copy-ip-btn {
    flex: 1;
    min-width: 0;
}

.copy-ip-btn {
    width: 100%;
    height: 28px;
    background-color: var(--mon-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    color: #000;
    white-space: nowrap;
    padding: 0 8px;
}

.copy-ip-btn:hover {
    background-color: var(--mon-primary-hover);
}

.copy-ip-btn-group .copy-ip-btn:nth-child(2) {
    background-color: transparent;
    border: 1px solid var(--mon-primary);
    color: var(--text-primary, inherit);
}

.copy-ip-btn-group .copy-ip-btn:nth-child(2):hover {
    background-color: rgba(16, 185, 129, 0.1);
}

.vote-block {
    width: 50px;
    min-width: 50px;
    background-color: transparent;
    border-radius: 12px;
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-icon {
    color: var(--mon-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-icon svg {
    width: 28px;
    height: 28px;
}

.vote-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--mon-primary);
    line-height: 1;
    text-align: center;
}

.server-banner {
    width: 35%;
    height: auto;
    aspect-ratio: 7.8;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.server-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.server-stats-mobile,
.server-banner-mobile,
.server-tags-mobile,
.copy-buttons-mobile,
.separator {
    display: none;
}

.server-banner-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    .server-map {
        flex-direction: column;
        height: auto;
        gap: 10px;
        padding-inline: 10px;
        padding-block: 15px;
    }

    .server-row {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .server-avatar {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .server-info {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .server-name {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .server-ip {
        font-size: 13px;
    }

    .vote-block {
        width: auto;
        flex-shrink: 0;
        margin-left: 0;
    }

    .vote-icon svg {
        width: 24px;
        height: 24px;
    }

    .vote-count {
        font-size: 11px;
    }

    .server-stats-container,
    .server-banner,
    .copy-buttons {
        display: none;
    }

    .server-stats-mobile {
        display: flex;
        gap: 8px;
        align-items: center;
        width: 100%;
        order: 2;
        flex-wrap: wrap;
    }

    .server-banner-mobile {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 7.8;
        background: var(--secondary, #e9ecef);
        background-size: cover;
        background-position: center;
        border-radius: 4px;
        margin-left: 0;
        order: 3;
    }

    .server-tags-mobile {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
        order: 4;
    }

    .separator {
        display: block;
        order: 5;
        width: 100%;
        height: 1px;
        background-color: var(--divider, #dee2e6);
    }

    .copy-buttons-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        width: 100%;
        order: 6;
    }

    .copy-buttons-mobile .copy-ip-btn {
        min-width: auto;
        height: 40px;
        font-size: 14px;
    }
}

/* ===== TABLET LAYOUT ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .server-map {
        height: 85px;
        padding: 12px;
        gap: 6px;
    }

    .server-avatar {
        width: 40px;
        height: 40px;
    }

    .server-info {
        width: 11%;
    }

    .server-stats-container {
        width: 22%;
        gap: 2px;
    }

    .server-banner {
        width: 28%;
    }

    .copy-buttons {
        width: 140px;
        min-width: 140px;
    }

    .vote-block {
        width: 40px;
        min-width: 40px;
    }

    .server-name {
        font-size: 12px;
    }

    .server-ip {
        font-size: 9px;
    }

    .tag {
        padding: 1px 4px;
        font-size: 8px;
        max-width: 50px;
    }

    .stat-badge {
        padding: 1px 4px;
        font-size: 8px;
    }

    .stat-badge.version {
        max-width: 80px;
    }

    .online-status {
        min-width: 65px;
    }

    .copy-ip-btn {
        height: 20px;
        font-size: 8px;
    }
}

/* ===== LAPTOP LAYOUT ===== */
@media (min-width: 1025px) and (max-width: 1440px) {
    .server-map {
        gap: 8px;
        height: 90px;
        padding: 14px;
    }

    .server-avatar {
        width: 50px;
        height: 50px;
    }

    .server-info {
        width: 12%;
    }

    .server-stats-container {
        width: 21%;
        gap: 2px;
    }

    .server-banner {
        width: 32%;
    }

    .copy-buttons {
        width: 150px;
        min-width: 150px;
    }

    .vote-block {
        width: 45px;
        min-width: 45px;
    }

    .server-name {
        font-size: 14px;
    }

    .server-ip {
        font-size: 11px;
    }

    .tag {
        padding: 2px 5px;
        font-size: 9px;
        max-width: 60px;
    }

    .stat-badge {
        padding: 2px 5px;
        font-size: 9px;
    }

    .stat-badge.version {
        max-width: 100px;
    }

    .online-status {
        min-width: 75px;
    }

    .copy-ip-btn {
        height: 24px;
        font-size: 9px;
    }
}

/* ===== DESKTOP LAYOUT ===== */
@media (min-width: 1441px) {
    .server-avatar {
        width: 60px;
        height: 60px;
    }

    .server-info {
        width: 15%;
    }

    .server-stats-container {
        width: 22%;
    }

    .server-banner {
        width: 420px;
        height: 60px;
        aspect-ratio: unset;
    }

    .copy-buttons {
        width: 180px;
        min-width: 180px;
    }

    .vote-block {
        width: 50px;
        min-width: 50px;
    }
}
