/* AdminCard Component Styles */

.admin-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease-in-out;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.admin-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
}

.admin-card.loading {
  pointer-events: none;
  opacity: 0.8;
}

.admin-card.error {
  border-color: var(--color-danger-light);
  background-color: var(--color-danger-light);
}

/* Status variants */
.admin-card.status-healthy {
  border-left: 4px solid var(--color-success);
}

.admin-card.status-warning {
  border-left: 4px solid var(--color-warning);
}

.admin-card.status-error {
  border-left: 4px solid var(--color-danger);
}

.admin-card.status-info {
  border-left: 4px solid var(--color-info);
}

/* Header */
.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.admin-card-title-section {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
}

.admin-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 0.125rem;
}

.admin-card-title-content {
  flex: 1;
}

.admin-card-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.admin-card-subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.admin-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  flex-shrink: 0;
}

/* Content */
.admin-card-content {
  position: relative;
}

/* Loading state */
.admin-card-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--color-text-secondary);
}

.admin-card-loading .spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border-light);
  border-top: 2px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.5rem;
}

.admin-card-loading p {
  margin: 0;
  font-size: 0.875rem;
}

/* Error state */
.admin-card-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background-color: var(--color-danger-light);
  border: 1px solid var(--color-danger);
  border-radius: 6px;
  color: var(--color-danger-dark);
}

.admin-card-error .error-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.admin-card-error p {
  margin: 0;
  font-size: 0.875rem;
  flex: 1;
}

/* Responsive Design - Sidebar-aware breakpoints */
/* Large desktop screens - sidebar + content fits comfortably */

/* Medium desktop - account for sidebar width limiting available space */

/* Small desktop/large tablet - sidebar significantly reduces available width */

/* Small tablets and large mobile screens */

/* Mobile phone screens */

/* Very small mobile screens */

/* Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Utility classes for specific card types */
.admin-card.compact {
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.admin-card.compact .admin-card-header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.admin-card.full-width {
  width: 100%;
  box-sizing: border-box;
}

.admin-card.no-border {
  border: none;
  box-shadow: none;
}

.admin-card.clickable {
  cursor: pointer;
}

.admin-card.clickable:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Dark theme specific adjustments */
[data-theme='dark'] .admin-card {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme='dark'] .admin-card:hover {
  background: var(--color-bg-secondary);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-light);
}

[data-theme='dark'] .admin-card.error {
  background-color: var(--color-danger-light);
  border-color: var(--color-danger);
}

[data-theme='dark'] .admin-card-header {
  border-bottom-color: var(--color-border);
}

[data-theme='dark'] .admin-card-loading .spinner {
  border-color: var(--color-border);
  border-top-color: var(--color-primary);
}

[data-theme='dark'] .admin-card.clickable:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}
