/**
 * Resource Request Form Styles
 * 
 * Styles for the resource request submission form.
 * Mobile-first responsive design with accessibility features.
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  min-height: 100vh;
  padding: 20px;
}

.page-container {
  max-width: 700px;
  margin: 0 auto;
}

/* Header */
.form-header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

.form-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.form-header .subtitle {
  font-size: 1rem;
  opacity: 0.95;
  line-height: 1.5;
}

/* Main form container */
.form-main {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Form groups */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 0.95rem;
}

.form-group .required {
  color: #e53e3e;
}

/* Text inputs */
.form-group textarea,
.form-group input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus {
  outline: none;
  border-color: #f5576c;
  box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Character count */
.char-count {
  text-align: right;
  font-size: 0.85rem;
  color: #718096;
  margin-top: 4px;
}

/* Help text */
.help-text {
  display: block;
  font-size: 0.85rem;
  color: #718096;
  margin-top: 4px;
}

/* Error messages */
.error-message {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

.form-group.has-error textarea,
.form-group.has-error input {
  border-color: #e53e3e;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.btn-submit,
.btn-cancel {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-submit {
  flex: 1;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  position: relative;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-cancel {
  background: #e2e8f0;
  color: #4a5568;
}

.btn-cancel:hover {
  background: #cbd5e0;
}

/* Loading state */
.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Form status */
.form-status {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-status.error {
  background: #fed7d7;
  color: #c53030;
  border: 1px solid #fc8181;
}

.form-status.info {
  background: #bee3f8;
  color: #2c5282;
  border: 1px solid #90cdf4;
}

/* Success confirmation */
.success-confirmation {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 24px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-confirmation h2 {
  color: #2d3748;
  margin-bottom: 12px;
  font-size: 1.75rem;
}

.success-confirmation p {
  color: #4a5568;
  margin-bottom: 30px;
  line-height: 1.6;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
  margin: 0 auto;
}

.btn-primary,
.btn-secondary {
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.btn-secondary:hover {
  background: #cbd5e0;
}

/* Responsive design */
@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .form-header h1 {
    font-size: 1.5rem;
  }

  .form-header .subtitle {
    font-size: 0.9rem;
  }

  .form-main {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-submit,
  .btn-cancel {
    width: 100%;
  }
}

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

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid #f5576c;
  outline-offset: 2px;
}
