/* Rise Log Pro Styles */

/* Changes diff table */
.rise-log-changes-table {
    font-size: 0.85em;
}

.rise-log-changes-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.85em;
    padding: 4px 8px;
}

.rise-log-changes-table td {
    padding: 4px 8px;
    word-break: break-word;
    max-width: 250px;
}

/* Stat cards */
.rise-log-stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Settings form */
#rise-log-settings-form .card {
    border: 1px solid #e3e6ef;
}

#rise-log-settings-form .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e3e6ef;
}

/* Badge alignment in tables */
.badge {
    font-size: 0.78em;
}

/* Filter bar spacing */
.filter-bar .form-control,
.filter-bar .form-select {
    margin-bottom: 5px;
}

/* Danger zone card */
.border-danger .card-header {
    border-bottom: 1px solid #dc3545;
}

/* History button (used inline next to entity titles) */
.rlp-history-btn {
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
    border: 1px solid rgba(0,0,0,0.12);
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
    margin-inline-start: 6px;
    line-height: 1.6;
    text-decoration: none;
}
.rlp-history-btn:hover {
    opacity: 1;
    background: rgba(0,0,0,0.04);
    text-decoration: none;
    color: #333;
}

/* History modal table */
#riseLogHistoryModal {
    z-index: 99999 !important;
}
#riseLogHistoryModal .modal-backdrop,
.modal-backdrop.rlp-backdrop {
    z-index: 99998 !important;
}
#riseLogHistoryModal .modal-body {
    min-height: 200px;
}
#riseLogHistoryModal .dataTables_wrapper {
    padding: 10px;
}

/* Print styles */
@media print {
    .page-title .title-button-group,
    #rpt_apply,
    .card-body.border-bottom .row.g-2,
    #rlp-reset-filters,
    #export-auth-csv,
    #export-view-csv,
    #export-csv-btn,
    .sidebar-toggle-btn,
    .mobile-bottom-menu,
    #left-menu-toggle-mask > .sidebar,
    .topbar { display: none !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd; }
    canvas { max-width: 100% !important; }
    .page-wrapper { margin: 0 !important; padding: 0 !important; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #top_users_container .table { font-size: 12px; }
    #top_users_container .table th:nth-child(n+3),
    #top_users_container .table td:nth-child(n+3) { display: none; }
}

/* Visual diff table */
.rlp-diff-table { border-collapse: collapse; width: 100%; font-size: 12px; line-height: 1.5; }
.rlp-diff-table tr { border-bottom: 1px solid #eee; }
.rlp-diff-table tr:last-child { border-bottom: none; }
.rlp-diff-field { color: #888; font-size: 11px; padding: 2px 8px 2px 0; white-space: nowrap; font-weight: 600; min-width: 70px; }
.rlp-diff-from { color: #C8102E; text-decoration: line-through; opacity: 0.75; padding: 2px 6px; }
.rlp-diff-arrow { color: #aaa; padding: 0 4px; font-size: 11px; }
.rlp-diff-to { color: #1D9E75; font-weight: 500; padding: 2px 6px; }
.rlp-diff-new { color: #1D9E75; padding: 1px 6px; background: rgba(29,158,117,.07); border-radius: 3px; font-style: italic; }

/* Filter presets */
.rlp-preset-tag { background: #f1f3f5; border: 1px solid #dee2e6; border-radius: 20px; padding: 3px 10px; font-size: 12px; cursor: pointer; transition: background .12s; }
.rlp-preset-tag:hover { background: #e9ecef; }
.rlp-preset-del { color: #aaa; margin-inline-start: 4px; font-size: 13px; cursor: pointer; text-decoration: none; }
.rlp-preset-del:hover { color: #dc3545; }
