/* Combined styles for Membaz Member Lookup Plugin */

/* Frontend Member Info Styles */
.membaz-member-info {
  background: #ffffff;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 24px;
  margin: 24px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.membaz-section {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.membaz-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.membaz-section h3 {
  color: #2c3e50;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #3498db;
  display: flex;
  align-items: center;
}

.membaz-section h3:before {
  content: "";
  width: 4px;
  height: 20px;
  background: #3498db;
  margin-right: 8px;
  border-radius: 2px;
}

.membaz-field {
  margin-bottom: 12px;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: start;
}

.membaz-field strong {
  color: #34495e;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.membaz-field-value {
  color: #2c3e50;
  font-weight: 400;
  line-height: 1.5;
}

/* Member Image Styles */
.membaz-member-image {
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}

.membaz-member-image:hover {
  transform: scale(1.02);
}

/* JSON Display Styles */
.membaz-json {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 20px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #495057;
}

/* Error and Status Messages */
.membaz-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  padding: 16px;
  color: #c53030;
  font-weight: 500;
  margin: 16px 0;
  display: flex;
  align-items: center;
}

.membaz-error:before {
  content: "⚠";
  margin-right: 8px;
  font-size: 18px;
}

.membaz-no-image {
  background: #f7fafc;
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  padding: 24px;
  color: #718096;
  text-align: center;
  font-style: italic;
  font-size: 14px;
}

.membaz-success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 6px;
  padding: 16px;
  color: #276749;
  font-weight: 500;
  margin: 16px 0;
}

/* Loading States */
.membaz-loading-state {
  opacity: 0.7;
  pointer-events: none;
}

.membaz-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: membaz-spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes membaz-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .membaz-member-info {
    margin: 16px 0;
    padding: 16px;
  }

  .membaz-field {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .membaz-field strong {
    margin-bottom: 4px;
  }

  .membaz-section h3 {
    font-size: 18px;
    cursor: pointer;
  }

  .membaz-section.collapsed .membaz-field {
    display: none;
  }
}

@media (max-width: 480px) {
  .membaz-member-info {
    padding: 12px;
    margin: 12px 0;
  }

  .membaz-section h3 {
    font-size: 16px;
  }

  .membaz-field {
    padding: 8px 0;
  }

  .membaz-json {
    font-size: 11px;
    padding: 12px;
  }
}

/* Print Styles */
@media print {
  .membaz-member-info {
    border: none;
    box-shadow: none;
    background: transparent;
    page-break-inside: avoid;
  }

  .membaz-section {
    break-inside: avoid;
  }

  .membaz-member-image {
    max-width: 200px;
    box-shadow: none;
  }

  .membaz-error,
  .membaz-no-image {
    display: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .membaz-member-info {
    background: #1a202c;
    border-color: #2d3748;
    color: #e2e8f0;
  }

  .membaz-section h3 {
    color: #e2e8f0;
  }

  .membaz-field strong {
    color: #cbd5e0;
  }

  .membaz-field-value {
    color: #e2e8f0;
  }

  .membaz-json {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }
}

/* Accessibility Improvements */
.membaz-member-info:focus-within {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

.membaz-section h3:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .membaz-member-info {
    border: 2px solid #000;
  }

  .membaz-section h3 {
    border-bottom-color: #000;
  }

  .membaz-error {
    border: 2px solid #c53030;
  }
}
