/* WP Community Connect - Production Ready Frontend Styles */

:root {
  --wcc-primary: #007cba;
  --wcc-primary-dark: #005a8e;
  --wcc-primary-light: #0096dd;
  --wcc-success: #10b981;
  --wcc-danger: #ef4444;
  --wcc-warning: #f59e0b;
  --wcc-text: #1f2937;
  --wcc-text-muted: #6b7280;
  --wcc-border: #e5e7eb;
  --wcc-bg: #ffffff;
  --wcc-bg-muted: #f9fafb;
  --wcc-bg-hover: #f3f4f6;
  --wcc-shadow: 0 1px 3px rgba(0,0,0,0.1);
  --wcc-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --wcc-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --wcc-radius: 12px;
  --wcc-radius-sm: 8px;
  --wcc-2: 0.5rem;
  --wcc-4: 1rem;
  --wcc-6: 1.5rem;
  --wcc-8: 2rem;
}

/* Simple fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Container */
.wcc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--wcc-4);
  animation: fadeIn 0.4s ease-out;
}

/* Grid Layout */
.wcc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--wcc-6);
  margin: var(--wcc-4) 0;
}

/* Stack Layout */
.wcc-stack {
  display: flex;
  flex-direction: column;
  gap: var(--wcc-4);
}

/* Cluster Layout */
.wcc-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wcc-2);
  align-items: center;
}

/* Card Styles */
.wcc-card {
  background: var(--wcc-bg);
  border: 1px solid var(--wcc-border);
  border-radius: var(--wcc-radius);
  padding: var(--wcc-6);
  box-shadow: var(--wcc-shadow);
  transition: all 0.2s ease;
  position: relative;
}

.wcc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wcc-shadow-lg);
  border-color: var(--wcc-primary-light);
}

/* Card Header */
.wcc-card-head {
  display: flex;
  gap: var(--wcc-4);
  align-items: center;
  margin-bottom: var(--wcc-4);
}

.wcc-card-head h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wcc-text);
  transition: color 0.2s ease;
}

.wcc-card:hover .wcc-card-head h4 {
  color: var(--wcc-primary);
}

/* Card Actions */
.wcc-card-actions {
  display: flex;
  gap: var(--wcc-2);
  margin-top: var(--wcc-6);
  padding-top: var(--wcc-4);
  border-top: 1px solid var(--wcc-border);
}

/* Avatar */
.wcc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--wcc-border);
  transition: border-color 0.2s ease;
}

.wcc-card:hover .wcc-avatar {
  border-color: var(--wcc-primary);
}

/* Button Styles */
.wcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--wcc-primary), var(--wcc-primary-dark));
  color: #ffffff;
  border: none;
  border-radius: var(--wcc-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wcc-btn:hover {
  background: linear-gradient(135deg, var(--wcc-primary-light), var(--wcc-primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.wcc-btn:active {
  transform: translateY(0);
}

.wcc-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Outline Button */
.wcc-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--wcc-primary);
  border: 2px solid var(--wcc-primary);
  border-radius: var(--wcc-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wcc-btn-outline:hover {
  background: var(--wcc-primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 124, 186, 0.2);
}

.wcc-btn-outline:active {
  transform: translateY(0);
}

/* Form Elements */
.wcc-input,
.wcc-select,
.wcc-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--wcc-border);
  border-radius: var(--wcc-radius-sm);
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  background: var(--wcc-bg);
  font-family: inherit;
}

.wcc-input:focus,
.wcc-select:focus,
.wcc-textarea:focus {
  outline: none;
  border-color: var(--wcc-primary);
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.wcc-input:hover:not(:focus),
.wcc-select:hover:not(:focus),
.wcc-textarea:hover:not(:focus) {
  border-color: var(--wcc-primary-light);
}

.wcc-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Badge */
.wcc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  background: var(--wcc-bg-muted);
  color: var(--wcc-text);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid var(--wcc-border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wcc-badge:hover {
  background: var(--wcc-bg-hover);
  transform: translateY(-1px);
}

/* Success Badge */
.wcc-badge.wcc-success {
  background: var(--wcc-success);
  color: #ffffff;
  border-color: var(--wcc-success);
}

/* Muted Text */
.wcc-muted {
  color: var(--wcc-text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Divider */
.wcc-divider {
  height: 1px;
  background: var(--wcc-border);
  margin: var(--wcc-6) 0;
  border: none;
}

/* QR Code Container */
#wcc-qr {
  background: var(--wcc-bg);
  padding: var(--wcc-4);
  border-radius: var(--wcc-radius);
  box-shadow: var(--wcc-shadow-md);
  transition: box-shadow 0.2s ease;
}

#wcc-qr:hover {
  box-shadow: var(--wcc-shadow-lg);
}

/* Loading Spinner */
.wcc-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Search Input Enhancement */
.wcc-input[name="wcc_search"] {
  padding-left: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
  background-size: 1.25rem;
}

/* Notification styles */
.wcc-notification {
  padding: 1rem 1.25rem;
  border-radius: var(--wcc-radius-sm);
  margin: var(--wcc-4) 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease-out;
}

.wcc-notification.success {
  background: #d1fae5;
  border-left: 4px solid var(--wcc-success);
  color: #065f46;
}

.wcc-notification.error {
  background: #fee2e2;
  border-left: 4px solid var(--wcc-danger);
  color: #991b1b;
}

/* Progress Bar */
.wcc-progress {
  width: 100%;
  height: 6px;
  background: var(--wcc-bg-muted);
  border-radius: 9999px;
  overflow: hidden;
}

.wcc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--wcc-primary), var(--wcc-success));
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wcc-grid {
    grid-template-columns: 1fr;
    gap: var(--wcc-4);
  }
  
  .wcc-container {
    padding: var(--wcc-2);
  }
  
  .wcc-card {
    padding: var(--wcc-4);
  }
  
  .wcc-btn,
  .wcc-btn-outline {
    width: 100%;
    justify-content: center;
  }
  
  .wcc-card-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .wcc-card-head {
    flex-direction: column;
    text-align: center;
  }
  
  .wcc-avatar {
    width: 64px;
    height: 64px;
  }
}

/* Accessibility */
.wcc-btn:focus-visible,
.wcc-btn-outline:focus-visible,
.wcc-input:focus-visible,
.wcc-select:focus-visible,
.wcc-textarea:focus-visible {
  outline: 3px solid var(--wcc-primary);
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .wcc-card {
    box-shadow: none;
    border: 1px solid #000;
    page-break-inside: avoid;
  }
  
  .wcc-btn,
  .wcc-btn-outline {
    display: none;
  }
}