/* components.css - Reusable UI component patterns (COMPLETE VERSION) */

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm, 0.5rem);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  text-decoration: none;
  transition: all 300ms ease;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.btn-primary {
  background: var(--color-accent, #8B008B);
  color: white;
}

.btn-primary:hover {
  background: #A100A1;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(139, 0, 139, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-fg, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent, #8B008B);
  border: 2px solid var(--color-accent, #8B008B);
}

.btn-outline:hover {
  background: rgba(139, 0, 139, 0.1);
}

/* Card Components */
.card {
  display: block;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  color: inherit;
  transition: all 300ms ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
  text-decoration: none;
  color: inherit;
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 60px;
  height: 60px;
  margin: 0 0 1.5rem 0;
  display: block;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-fg, #ffffff);
}

.card-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-muted, #c9d2d6);
  margin: 0;
}

/* Grid Systems */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .grid-auto {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Section Components */
.section {
  padding: 4rem 0;
}

.section:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 2rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-fg, #ffffff);
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  margin: 0;
  color: var(--color-muted, #c9d2d6);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* List Components */
.list-checkmark {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-checkmark li {
  padding-left: 2rem;
  position: relative;
  line-height: 1.6;
}

.list-checkmark li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent, #8B008B);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Form Components */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-fg, #ffffff);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md, 8px);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-fg, #ffffff);
  font-size: 1rem;
  transition: border-color 300ms ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent, #8B008B);
  box-shadow: 0 0 0 3px rgba(139, 0, 139, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Utility Components */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2rem; }
.mt-xl { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 1rem; }
.mb-md { margin-bottom: 1.5rem; }
.mb-lg { margin-bottom: 2rem; }
.mb-xl { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-sm { padding: 1rem; }
.p-md { padding: 1.5rem; }
.p-lg { padding: 2rem; }
.p-xl { padding: 3rem; }

/* Image utilities */
.img-responsive {
  width: 100%;
  height: auto;
  display: block;
}

/* Page wrapper utility */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--color-accent, #8B008B);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}