/* Accessibility & Focus improvements */
.tool-item:focus,
.button:focus {
  outline: 2px solid #66afe9;
  outline-offset: 2px;
}

/* Row hover for better table readability */
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .button { padding: 6px 10px; font-size: 0.95rem; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table.fixed-layout th.col-80, .table.fixed-layout td.col-80 { width: 64px; }
  .table.fixed-layout th.col-180, .table.fixed-layout td.col-180 { width: 140px; }
}

/* Badge readability tweak */
.badge {
  font-weight: 600;
}

/* Deutlicher Fokus nur wenn per Tastatur navigiert (prefers-reduced-motion nicht direkt betroffen) */
.tool-item:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(102,175,233,0.95);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(102,175,233,0.06);
}

/* Tool-Item Hover */
.tool-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Sehr kleine Bildschirme: Karten reduzieren auf 1 Spalte */
@media (max-width: 380px) {
  .tools-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 8px; }
  .tool-icon { font-size: 1.6rem; }
}
/* Moderatoren-Tools – modernes, konsistentes Design */
:root{
  --bg:#0b0f14;--panel:#11171f;--panel2:#0e141b;--text:#e5e7eb;--muted:#94a3b8;--accent:#3b82f6;--accent2:#60a5fa;--danger:#ef4444;--warning:#f59e0b;--success:#10b981;--border:#1f2937;--ring:rgba(59,130,246,.35)
}

.tools-container.popup{background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:16px;box-shadow:0 8px 24px rgba(0,0,0,.45);}
.tools-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border)}
.tools-header h3{margin:0;font-size:16px;font-weight:700}
.tools-body{padding:14px}
.popup{max-width:95vw;max-height:90vh}
.popup .popup-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);padding:10px 12px}
.popup .popup-header h3{margin:0}
.popup .popup-header .close{width:24px;height:24px;cursor:pointer}
.popup .popup-body{padding:12px}
.popup-scroll{max-height:80vh;overflow-y:auto}

.tools-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:640px){.tools-grid{grid-template-columns:repeat(2,1fr)}}
.tool-item{display:flex;flex-direction:column;align-items:center;gap:8px;background:var(--panel2);border:1px solid var(--border);border-radius:12px;padding:12px;cursor:pointer;transition:.15s ease}
.tool-item:hover{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.tool-item:focus{outline:none}
.tool-item:focus-visible{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.tool-icon{width:40px;height:40px}
.tool-label{font-size:13px;color:var(--text)}
.tool-sub{font-size:12px;color:var(--muted)}
.text-center{text-align:center}
.mt-10{margin-top:10px}
.mt-16{margin-top:16px}

/* Badges */
.badge{display:inline-flex;align-items:center;justify-content:center;padding:2px 6px;min-width:22px;border-radius:12px;font-size:12px;font-weight:600;border:1px solid var(--border)}
.badge-danger{background:rgba(239,68,68,.2);color:#fee2e2;border-color:#ef4444}
.badge-warning{background:rgba(245,158,11,.22);color:#fde68a;border-color:#f59e0b}
.badge-success{background:rgba(16,185,129,.2);color:#a7f3d0;border-color:#10b981}
.badge-muted{background:var(--panel2);color:var(--muted)}

/* Button Badges (Ecken) */
.mod-badge,.forum-badge{position:absolute;top:-6px;right:-6px;background:#e53935;color:#fff;border-radius:12px;padding:2px 6px;min-width:22px;text-align:center;font-size:12px;font-weight:700;pointer-events:none;z-index:10}
.btn-tools,.btn-forum{position:relative}

/* Tabellen allgemein */
.table{width:100%;border-collapse:separate;border-spacing:0 8px}
.table thead th{font-size:12px;text-transform:uppercase;color:var(--muted);text-align:left;padding:0 8px}
.table tbody tr{background:var(--panel2);border:1px solid var(--border)}
.table tbody td{padding:10px 8px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.table .actions{display:flex;gap:8px}
.fixed-layout{table-layout:fixed}
.col-80{width:80px}
.col-180{width:180px}

/* Smiley badge auf Icon */
.smiley-unapproved-count{position:absolute;top:2px;right:8px}

/* Notifications popup moderation rows */
.popup .notif-item{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-radius:8px;margin:4px 0;cursor:pointer}
.popup .notif-item:hover,.popup .notif-item:focus{background:rgba(255,255,255,0.02);outline:none}
.popup .notif-item .badge{min-width:26px}
.popup .notif-live{position:absolute;left:-9999px}

/* Close-Icon */
.tools-header .close{width:24px;height:24px;cursor:pointer}

/* Bildupload Grid & Thumbs */
.images-grid{display:flex;flex-wrap:wrap;gap:8px}
.image-thumb{width:120px;cursor:pointer;border-radius:8px}
.image-zoomable{cursor:zoom-in}

/* Pagination */
.page-info{margin:0 12px;color:var(--muted)}

/* Row states for tables */
.row-warning{background:rgba(245,158,11,.10)!important;border-left:4px solid var(--warning)}
.row-ok{background:rgba(16,185,129,.10)!important}

/* Unified buttons */
.button{appearance:none;border:1px solid var(--border);background:var(--panel);color:var(--text);padding:8px 12px;border-radius:10px;font-size:14px;cursor:pointer;transition:.15s ease}
.button:hover{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.button-primary{background:linear-gradient(180deg,var(--accent),var(--accent2));border-color:transparent;color:#fff}
.button-danger{background:linear-gradient(180deg,#ef4444,#dc2626);border-color:transparent;color:#fff}
.button-success{background:linear-gradient(180deg,#10b981,#0ea5a3);border-color:transparent;color:#fff}

/* Modernes Smiley-Moderation Popup */
.smiley-moderation-popup {
    width: 900px !important;
    max-width: 95vw !important;
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f4ff 100%) !important;
    border: 1px solid #e0e6ff !important;
    box-shadow: 0 8px 32px rgba(121, 140, 250, 0.15) !important;
}

.smiley-moderation-popup .popup-header {
    background: linear-gradient(90deg, #798cfa 0%, #795df5 100%) !important;
    color: white !important;
    padding: 20px 24px !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
}

.smiley-moderation-popup .popup-header h3 {
    color: white !important;
    font-size: 1.3em !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.smiley-moderation-popup .popup-header .close {
    filter: brightness(0) invert(1) !important;
    opacity: 0.9 !important;
    transition: all 0.2s ease !important;
}

.smiley-moderation-popup .popup-header .close:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

.smiley-moderation-popup .popup-body {
    padding: 24px !important;
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f4ff 100%) !important;
}

.smiley-moderation-popup .smiley-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: white !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(121, 140, 250, 0.08) !important;
}

.smiley-moderation-popup .smiley-table thead {
    background: linear-gradient(90deg, #f5f7ff 0%, #e8f0ff 100%) !important;
}

.smiley-moderation-popup .smiley-table thead th {
    background: linear-gradient(90deg, #f5f7ff 0%, #e8f0ff 100%) !important;
    color: #334155 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #d0d8ff !important;
    padding: 14px 12px !important;
    font-size: 0.95em !important;
    text-align: left !important;
    letter-spacing: 0.5px !important;
}

.smiley-moderation-popup .smiley-table tbody tr {
    border-bottom: 1px solid #e0e6ff !important;
    background: white !important;
    transition: all 0.2s ease !important;
}

.smiley-moderation-popup .smiley-table tbody tr:hover {
    background: #f8faff !important;
    box-shadow: 0 2px 6px rgba(121, 140, 250, 0.1) !important;
}

.smiley-moderation-popup .smiley-table tbody tr.row-warning {
    background: #fff7ed !important;
    border-left: 4px solid #ffa502 !important;
}

.smiley-moderation-popup .smiley-table tbody tr.row-warning:hover {
    background: #fff3e6 !important;
}

.smiley-moderation-popup .smiley-table tbody td {
    padding: 12px !important;
    font-size: 0.95em !important;
    color: #334155 !important;
    vertical-align: middle !important;
}

.smiley-moderation-popup .smiley-table .image-thumb {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
    cursor: zoom-in !important;
    border-radius: 6px !important;
    background: #f8faff !important;
    padding: 4px !important;
    transition: all 0.2s ease !important;
}

.smiley-moderation-popup .smiley-table .image-thumb:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(121, 140, 250, 0.2) !important;
    background: white !important;
}

.smiley-moderation-popup .approve-btn,
.smiley-moderation-popup .delete-btn {
    padding: 6px 12px !important;
    font-size: 0.9em !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-right: 6px !important;
}

.smiley-moderation-popup .approve-btn {
    background: linear-gradient(90deg, #4CAF50, #45a049) !important;
    color: white !important;
}

.smiley-moderation-popup .approve-btn:hover {
    background: linear-gradient(90deg, #45a049, #3d8b40) !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
    transform: translateY(-1px) !important;
}

.smiley-moderation-popup .delete-btn {
    background: linear-gradient(90deg, #ff4757, #ff3838) !important;
    color: white !important;
}

.smiley-moderation-popup .delete-btn:hover {
    background: linear-gradient(90deg, #ff3838, #e63030) !important;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3) !important;
    transform: translateY(-1px) !important;
}

.smiley-moderation-popup .smiley-pagination {
    margin-top: 20px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
}

.smiley-moderation-popup .smiley-pagination .button {
    background: linear-gradient(90deg, #798cfa 0%, #795df5 100%) !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
}

.smiley-moderation-popup .smiley-pagination .button:hover {
    background: linear-gradient(90deg, #6a7be8 0%, #6a4de5 100%) !important;
    box-shadow: 0 2px 8px rgba(121, 140, 250, 0.3) !important;
}

.smiley-moderation-popup .page-info {
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 0.95em !important;
}

/* Smiley Zoom Overlay (Lupe) - Modernes Design */
#smiley-zoom-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    animation: fadeIn 0.2s ease !important;
}

#smiley-zoom-overlay > div {
    background: white !important;
    padding: 32px 24px !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    animation: zoomIn 0.3s ease !important;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#smiley-zoom-overlay img {
    max-width: 400px !important;
    max-height: 400px !important;
    display: block !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

#close-smiley-zoom {
    margin-top: 24px !important;
    padding: 10px 24px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    border: none !important;
    background: linear-gradient(90deg, #ff4757, #ff3838) !important;
    color: white !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

#close-smiley-zoom:hover {
    background: linear-gradient(90deg, #ff3838, #e63030) !important;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Mobile Optimierung für Smiley-Moderation */
@media (max-width: 900px) {
    .smiley-moderation-popup {
        width: 90vw !important;
    }
    
    .smiley-moderation-popup .smiley-table .image-thumb {
        width: 40px !important;
        height: 40px !important;
    }
    
    .smiley-moderation-popup .approve-btn,
    .smiley-moderation-popup .delete-btn {
        padding: 5px 10px !important;
        font-size: 0.85em !important;
    }
}

@media (max-width: 600px) {
    .smiley-moderation-popup {
        width: 98vw !important;
        max-height: 90vh !important;
    }
    
    .smiley-moderation-popup .popup-header {
        padding: 16px 16px !important;
    }
    
    .smiley-moderation-popup .popup-body {
        padding: 16px !important;
    }
    
    .smiley-moderation-popup .smiley-table thead th {
        padding: 10px 6px !important;
        font-size: 0.85em !important;
    }
    
    .smiley-moderation-popup .smiley-table tbody td {
        padding: 8px 6px !important;
        font-size: 0.85em !important;
    }
    
    .smiley-moderation-popup .approve-btn,
    .smiley-moderation-popup .delete-btn {
        padding: 4px 8px !important;
        font-size: 0.8em !important;
        margin-right: 4px !important;
    }
    
    #smiley-zoom-overlay img {
        max-width: 90vw !important;
        max-height: 70vh !important;
    }
}

