/* ============================================
   Movie Form - Modern, Clean & Accessible Styles
   ============================================ */

/* Page Header */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 0;
}

/* Form Cards */
.form-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.form-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.form-card-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
  border-bottom: 1px solid #e9ecef;
}

.form-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.25rem;
}

.form-card-subtitle {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0;
}

.form-card-body {
  padding: 2rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.75rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Form Row (side-by-side fields) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

/* Labels */
.form-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.form-label.required {
  font-weight: 600;
}

.required-indicator {
  color: #dc3545;
  margin-left: 0.25rem;
}

.optional-text {
  font-weight: 400;
  color: #6c757d;
  font-size: 0.875rem;
}

/* Modern Inputs */
.modern-input {
  display: block;
  width: 100%;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #ffffff;
  background-clip: padding-box;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.modern-input:focus {
  color: #212529;
  background-color: #ffffff;
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.modern-input::placeholder {
  color: #adb5bd;
  opacity: 1;
}

.modern-input.is-invalid {
  border-color: #dc3545;
}

.modern-input.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Textarea specific */
textarea.modern-input {
  resize: vertical;
  min-height: 120px;
}

/* Form Help Text */
.form-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6c757d;
  line-height: 1.5;
}

/* Invalid Feedback */
.invalid-feedback {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #dc3545;
  font-weight: 500;
}

.invalid-feedback.d-block {
  display: block;
}

.modern-input.is-invalid ~ .invalid-feedback {
  display: block;
}

/* Poster Upload */
.poster-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.75rem;
}

.poster-current,
.poster-preview {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.poster-thumbnail {
  max-height: 300px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Alerts */
.alert {
  border-radius: 8px;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

/* Actor Credits */
.actor-credit-row {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.actor-credit-row:hover {
  border-color: #dee2e6;
  background: #ffffff;
}

.actor-credit-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

@media (max-width: 768px) {
  .actor-credit-fields {
    grid-template-columns: 1fr;
  }
}

.actor-credit-field {
  display: flex;
  flex-direction: column;
}

.actor-credit-actions {
  display: flex;
  align-items: flex-end;
}

/* Buttons */
.btn-add {
  color: #0d6efd;
  background-color: #ffffff;
  border-color: #dee2e6;
}

.btn-add:hover {
  color: #0b5ed7;
  background-color: #e7f1ff;
  border-color: #0d6efd;
}

.btn-remove {
  color: #dc3545;
  background-color: #ffffff;
  border-color: #dee2e6;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-remove:hover {
  color: #ffffff;
  background-color: #dc3545;
  border-color: #dc3545;
}

@media (max-width: 576px) {
  .btn-text {
    display: none;
  }
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e9ecef;
}

@media (max-width: 576px) {
  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Accessibility - Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.5);
  outline-offset: 2px;
}

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

/* Loading State (optional enhancement) */
.form-card.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

