/**
 * Admin Activity Log Styles
 */

/* Settings Page */
.pdt-activity-log-settings .pdt-settings-section {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
}

.pdt-activity-log-settings .pdt-settings-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  font-weight: 600;
}

.pdt-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.pdt-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f6f7f7;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.pdt-checkbox-grid label:hover {
  background: #e8f4fc;
}

/* Badge styles */
.pdt-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 3px;
  margin-left: 6px;
}

.pdt-badge-new {
  background: #2271b1;
  color: #fff;
}

/* Severity indicator in logs */
.pdt-severity-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.pdt-severity-critical {
  background: #d63638;
}

.pdt-severity-warning {
  background: #dba617;
}

.pdt-severity-info {
  background: #2271b1;
}

.pdt-form-row {
  margin-bottom: 16px;
}

.pdt-form-row label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.pdt-form-row select,
.pdt-form-row input[type="email"],
.pdt-form-row input[type="text"] {
  min-width: 250px;
}

.pdt-help-text {
  font-size: 12px;
  margin-left: 8px;
}

.pdt-help-text-warning {
  color: #d63638;
}

.pdt-consent-notice {
  background: #fff8e5;
  border-left: 4px solid #dba617;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.pdt-consent-notice-text {
  margin: 8px 0 0;
}

/* Toggle Switch */
.pdt-toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.pdt-toggle-switch input {
  display: none;
}

.pdt-toggle-slider {
  position: relative;
  width: 50px;
  height: 26px;
  background: #ccc;
  border-radius: 26px;
  transition: background 0.3s;
}

.pdt-toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}

.pdt-toggle-switch input:checked + .pdt-toggle-slider {
  background: #2271b1;
}

.pdt-toggle-switch input:checked + .pdt-toggle-slider::before {
  transform: translateX(24px);
}

.pdt-toggle-label {
  font-weight: 600;
  font-size: 14px;
}

/* Logs Page */
.pdt-activity-logs {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 20px;
}

.pdt-logs-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.pdt-filter-form .pdt-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pdt-filter-form input[type="text"],
.pdt-filter-form input[type="date"],
.pdt-filter-form select {
  padding: 6px 12px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 13px;
  min-width: 120px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.pdt-filter-form input[type="text"],
.pdt-filter-form input[type="date"] {
  background-image: none;
  padding-right: 12px;
}

.pdt-filter-form input[type="text"] {
  width: 180px;
  min-width: 180px;
}

.pdt-filter-form input[type="date"] {
  width: 140px;
  min-width: 140px;
}

.pdt-logs-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.pdt-logs-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  height: 36px;
  box-sizing: border-box;
  line-height: 36px;
}

.pdt-logs-actions .pdt-btn-export {
  background: #2271b1;
  color: #fff;
  border: 1px solid #2271b1;
}

.pdt-logs-actions .pdt-btn-export:hover {
  background: #135e96;
  border-color: #135e96;
  color: #fff;
}

.pdt-logs-actions .pdt-btn-clear {
  background: #fff;
  color: #d63638;
  border: 1px solid #d63638;
}

.pdt-logs-actions .pdt-btn-clear:hover {
  background: #d63638;
  color: #fff;
}

.pdt-logs-actions .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 1;
}

.pdt-logs-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #646970;
}

/* Logs Table */
.pdt-logs-table {
  border: 1px solid #c3c4c7;
  border-radius: 4px;
}

.pdt-logs-table th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1d2327;
  background: #f6f7f7;
}

.pdt-logs-table td {
  vertical-align: middle;
}

.pdt-logs-empty-cell {
  text-align: center;
  padding: 40px;
}

.pdt-log-date {
  display: block;
  font-weight: 500;
}

.pdt-log-time {
  display: block;
  font-size: 11px;
  color: #646970;
}

.pdt-log-user {
  font-weight: 500;
}

.pdt-log-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.pdt-log-action .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.pdt-action-success {
  background: #d4edda;
  color: #155724;
}

.pdt-action-info {
  background: #d1ecf1;
  color: #0c5460;
}

.pdt-action-warning {
  background: #fff3cd;
  color: #856404;
}

.pdt-action-danger {
  background: #f8d7da;
  color: #721c24;
}

.pdt-action-default {
  background: #e9ecef;
  color: #495057;
}

.pdt-log-object {
  font-size: 13px;
}

.pdt-object-type {
  color: #646970;
  font-size: 11px;
  text-transform: uppercase;
}

.pdt-log-ip {
  font-size: 11px;
  padding: 2px 6px;
  background: #f0f0f1;
  border-radius: 3px;
}

.pdt-log-na {
  color: #a0a5aa;
}

/* Pagination */
.pdt-logs-pagination {
  margin-top: 20px;
  text-align: center;
}

.pdt-logs-pagination .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  text-decoration: none;
  color: #2271b1;
  background: #fff;
}

.pdt-logs-pagination .page-numbers.current {
  background: #2271b1;
  color: #fff;
  border-color: #2271b1;
}

.pdt-logs-pagination .page-numbers:hover:not(.current) {
  background: #f0f0f1;
}

/* Responsive */
@media screen and (max-width: 782px) {
  .pdt-logs-filters {
    flex-direction: column;
  }
  
  .pdt-filter-form .pdt-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .pdt-filter-form input[type="text"],
  .pdt-filter-form input[type="date"],
  .pdt-filter-form select {
    width: 100%;
  }
  
  .pdt-checkbox-grid {
    grid-template-columns: 1fr;
  }
  
  .pdt-logs-table {
    font-size: 12px;
  }
  
  .pdt-logs-table th,
  .pdt-logs-table td {
    padding: 8px 6px;
  }
}
