/**
 * Settings Snapshot UI Styles
 *
 * Uses CSS Custom Properties from the Design System.
 */

/* Import design system variables */
@import url('../../../styles/design-system.css');

/* Container */
.prorank-settings-snapshot {
  padding: var(--pr-spacing-medium, 16px);
}

.prorank-settings-snapshot--embedded {
  padding: 0;
}

/* Loading state */
.prorank-settings-snapshot__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--pr-spacing-xlarge, 32px);
  text-align: center;
  gap: var(--pr-spacing-medium, 16px);
}

.prorank-settings-snapshot__loading p {
  margin: 0;
  color: var(--pr-text-secondary, #555);
  font-size: var(--pr-font-size-base, 14px);
}

/* Header */
.prorank-settings-snapshot__header {
  margin-bottom: var(--pr-spacing-large, 24px);
}

.prorank-settings-snapshot__header h3 {
  margin: 0 0 var(--pr-spacing-small, 8px);
  font-size: var(--pr-font-size-large, 16px);
  font-weight: var(--pr-font-weight-semibold, 600);
  color: var(--pr-text-primary, #1e1e1e);
}

.prorank-settings-snapshot__header .description {
  margin: 0;
  color: var(--pr-text-secondary, #555);
  font-size: var(--pr-font-size-small, 13px);
  line-height: 1.5;
}

/* Actions bar */
.prorank-settings-snapshot__actions {
  display: flex;
  align-items: center;
  gap: var(--pr-spacing-medium, 16px);
  margin-bottom: var(--pr-spacing-large, 24px);
}

.prorank-settings-snapshot__limit-notice {
  color: var(--pr-text-tertiary, #757575);
  font-size: var(--pr-font-size-xsmall, 11px);
}

/* Empty state */
.prorank-settings-snapshot__empty {
  margin: 0;
  color: var(--pr-text-secondary, #555);
  font-size: var(--pr-font-size-base, 14px);
  text-align: center;
  padding: var(--pr-spacing-large, 24px) 0;
}

/* Snapshots list */
.prorank-settings-snapshot__list {
  display: flex;
  flex-direction: column;
  gap: var(--pr-spacing-small, 8px);
}

/* Snapshot item */
.prorank-settings-snapshot__item {
  transition: all var(--pr-motion-duration-fast, 200ms)
    var(--pr-motion-easing-standard, ease-in-out);
}

.prorank-settings-snapshot__item:hover {
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}

.prorank-settings-snapshot__item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pr-spacing-medium, 16px);
}

.prorank-settings-snapshot__item-info {
  flex: 1;
  min-width: 0;
}

.prorank-settings-snapshot__item-info h4 {
  margin: 0 0 var(--pr-spacing-xsmall, 4px);
  font-size: var(--pr-font-size-base, 14px);
  font-weight: var(--pr-font-weight-medium, 500);
  color: var(--pr-text-primary, #1e1e1e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prorank-settings-snapshot__item-meta {
  margin: 0;
  color: var(--pr-text-tertiary, #757575);
  font-size: var(--pr-font-size-xsmall, 11px);
}

.prorank-settings-snapshot__item-actions {
  display: flex;
  gap: var(--pr-spacing-small, 8px);
  flex-shrink: 0;
}

/* Modal */
.prorank-settings-snapshot__modal {
  max-width: 500px;
}

.prorank-settings-snapshot__modal p {
  margin: 0 0 var(--pr-spacing-medium, 16px);
  font-size: var(--pr-font-size-base, 14px);
  line-height: 1.5;
}

.prorank-settings-snapshot__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--pr-spacing-small, 8px);
  margin-top: var(--pr-spacing-large, 24px);
  padding-top: var(--pr-spacing-medium, 16px);
  border-top: 1px solid var(--pr-border-light, #e0e0e0);
}

/* Loading overlay */
.prorank-settings-snapshot__overlay {
  position: fixed;
  inset: 0;
  background: rgb(255 255 255 / 90%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--pr-spacing-medium, 16px);
  z-index: 100000;
}

.prorank-settings-snapshot__overlay p {
  margin: 0;
  font-size: var(--pr-font-size-base, 14px);
  color: var(--pr-text-primary, #1e1e1e);
}

/* Accessibility */
.prorank-settings-snapshot__item-actions button:focus {
  outline: 2px solid var(--pr-color-primary, #2271b1);
  outline-offset: 2px;
}

/* Responsive */
@media (width <= 600px) {
  .prorank-settings-snapshot__item-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .prorank-settings-snapshot__item-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .prorank-settings-snapshot__item {
    border-width: 2px;
  }

  .prorank-settings-snapshot__item:hover {
    border-color: var(--pr-color-primary, #2271b1);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .prorank-settings-snapshot__item {
    transition: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .prorank-settings-snapshot__item {
    background: var(--pr-background-dark, #2c2c2c);
    border-color: var(--pr-border-dark, #404040);
  }

  .prorank-settings-snapshot__item:hover {
    border-color: var(--pr-border-hover-dark, #555);
  }

  .prorank-settings-snapshot__overlay {
    background: rgb(30 30 30 / 90%);
  }
}

/* WordPress Admin Dark Mode */
.wp-admin.prorank-dark-theme .prorank-settings-snapshot__item {
  background: #2c2c2c;
  border-color: #404040;
}

.wp-admin.prorank-dark-theme .prorank-settings-snapshot__item:hover {
  border-color: #555;
  box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
}

.wp-admin.prorank-dark-theme .prorank-settings-snapshot__item-info h4 {
  color: #e0e0e0;
}

.wp-admin.prorank-dark-theme .prorank-settings-snapshot__modal {
  background: #2c2c2c;
  color: #e0e0e0;
}
