/* ========================================
   ADMIN FORMS
   Shared styling for admin CRUD forms
   ======================================== */

.admin-form {
  max-width: 900px;
}

.admin-form .admin-form-section {
  background: var(--bulma-scheme-main);
  border: 1px solid var(--bulma-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-form .admin-form-section:focus-within {
  border-color: #6b7280;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

[data-theme="dark"] .admin-form .admin-form-section:focus-within {
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
}

.admin-form .admin-form-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bulma-border);
}

.admin-form .admin-form-section-header .icon {
  color: #6b7280;
  font-size: 1.1rem;
}

.admin-form .admin-form-section-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bulma-text-weak);
  margin: 0;
}

.admin-form .admin-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.admin-form .admin-form-actions {
  background: var(--bulma-scheme-main);
  border: 1px solid var(--bulma-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .admin-form .admin-form-actions {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-form .admin-form-actions .buttons {
  margin-bottom: 0;
}

.admin-form .admin-form-actions .button.is-danger {
  background-color: transparent;
  border-color: var(--bulma-danger, #f14668);
  color: var(--bulma-danger, #f14668);
}

.admin-form .admin-form-actions .button.is-danger:hover {
  background-color: var(--bulma-danger, #f14668);
  color: white;
}

/* --- Responsive --- */

@media screen and (max-width: 1024px) {
  .admin-form .admin-form-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .admin-form .admin-form-grid-3 > :last-child {
    grid-column: span 2;
  }
}

@media screen and (max-width: 768px) {
  .admin-form .admin-form-grid-3 {
    grid-template-columns: 1fr;
  }

  .admin-form .admin-form-grid-3 > :last-child {
    grid-column: span 1;
  }

  .admin-form .admin-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-form .admin-form-actions .buttons {
    justify-content: center;
  }

  .admin-form .admin-form-actions .button.is-danger {
    align-self: center;
  }
}
