/* styles/_components.css - Reusable UI Components */

.card-body {
    padding: 20px;
}

.card,
.panel,
.box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 50px var(--shadow);
}

.panel {
    padding: 22px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.btn,
button,
input[type="submit"],
input[type="button"],
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border: none;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active,
button:active {
    transform: translateY(0);
}

.btn,
button,
input[type="submit"] {
    background: var(--accent-strong);
    color: #ffffff;
}

.btn-primary {
    background: var(--accent-strong);
    color: #ffffff;
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-warning {
    background: var(--warning);
    color: #0f172a;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.alert {
    padding: 16px 18px;
    border-radius: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #dbf8e1;
}

.alert-error {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ffd6d6;
}

.card-grid,
.profile-stats {
    display: grid;
    gap: 20px;
}

.card-muted,
.info-box,
.status-card,
.news-card,
.gallery-card,
.ticket-card,
.server-card,
.comment-card,
.lightbox-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.info-box {
    padding: 22px;
}

.status-card,
.news-card,
.gallery-card,
.ticket-card,
.server-card,
.comment-card {
    padding: 22px;
}

.server-card {
    position: relative;
}

.server-card .status-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.status-pill.open { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }

.status-pill.pending { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }

.status-pill.answered { background: rgba(34, 197, 94, 0.16); color: #86efac; }

.status-pill.closed { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }

.link-button,
.badge-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease;
}

.link-button:hover,
.badge-link:hover {
    background: rgba(96, 165, 250, 0.16);
}

.article-body,
.gallery-grid,
.card-grid,
.servers-list,
.comments-list {
    display: grid;
    gap: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.lightbox-panel .lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    color: #bbb;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
}

.lightbox-panel .lightbox-card {
    width: 100%;
    max-width: 900px;
    background: var(--surface);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-panel .lightbox-header {
    padding: 20px;
    background: var(--surface-alt);
    color: var(--text);
}

.lightbox-panel .lightbox-body {
    position: relative;
    background: #000;
    min-height: 320px;
}

.lightbox-panel .lightbox-body iframe,
.lightbox-panel .lightbox-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn[disabled], button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.3);
}

.server-card.online {
    background: rgba(34, 197, 94, 0.08);
    border-left-color: var(--success);
}

.server-card.offline {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--danger);
}

.server-card.maintenance {
    background: rgba(245, 158, 11, 0.08);
    border-left-color: var(--warning);
}

.summary-box,
.table-action-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
}

.table-action-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.3);
    color: #bfdbfe;
}

.btn.full-width { width: 100%; display: inline-block; }

.disabled,
.btn.disabled,
button.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.table-clean {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    table-layout: fixed;
}

.table-clean th,
.table-clean td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    white-space: normal;
    word-break: break-word;
}

.table-clean th {
    background: var(--surface-alt);
    font-weight: 600;
}

.table-clean tr:last-child td {
    border-bottom: none;
}

.table-clean input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-open {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.26);
}

.badge-answered {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

.badge-closed {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.28);
}

.badge-muted {
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
    border-color: rgba(148, 163, 184, 0.24);
}

.link-button,
.action-link,
.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.link-button:hover,
.action-link:hover,
.nav-link:hover {
    background: rgba(96, 165, 250, 0.16);
}

.card-list {
    display: grid;
    gap: 20px;
}

.lightbox-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-panel.active {
    display: flex;
}

.lightbox-panel .lightbox-card {
    width: 100%;
    max-width: 900px;
    background: var(--surface);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-panel .lightbox-header {
    padding: 20px;
    background: var(--surface-alt);
    color: var(--text);
}

.lightbox-panel .lightbox-body {
    position: relative;
    background: #000;
    min-height: 320px;
}

.lightbox-panel .lightbox-body iframe,
.lightbox-panel .lightbox-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #bbb;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.lightbox-close:hover {
    color: #fff;
}

.table-clean {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.table-clean th,
.table-clean td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.table-clean th {
    background: var(--surface-alt);
    text-align: left;
}

.table-clean tr:last-child td {
    border-bottom: none;
}

.table-clean input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.video-frame,
.lightbox-panel {
    border-radius: 18px;
    overflow: hidden;
}

.video-frame iframe,
.lightbox-panel iframe,
.lightbox-panel img {
    width: 100%;
    display: block;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.table th,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.table th {
    color: var(--muted);
    text-align: left;
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.badge.success {
    background: rgba(34, 197, 94, 0.16);
    color: #a7f3d0;
}

.badge.warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fce6b3;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}

.cookie-bar {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(22, 31, 44, 0.98);
    color: #e2e8f0;
    padding: 18px 22px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cookie-bar button {
    border-radius: 999px;
    background: var(--success);
    color: #0f172a;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: 18px;
}

.table-responsive table {
    min-width: 720px;
}
