/**
 * Unified Form Layout Styles
 * Consistent layout for infringements.html and outofclass.html
 * @version 1.0.0
 */

/* ===== Main Container ===== */
.unified-form-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-lg, 24px);
}

/* ===== Page Header ===== */
.unified-page-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl, 48px);
  padding: var(--spacing-xl, 32px);
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.05) 0%, 
    rgba(99, 102, 241, 0.05) 100%);
  border-radius: var(--border-radius, 12px);
}

.unified-page-header .logo {
  height: 50px;
  width: auto;
  margin-bottom: 16px;
  object-fit: contain;
}

.unified-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin: 0 0 8px 0;
}

.unified-page-subtitle {
  font-size: 1.125rem;
  color: var(--text-light, #64748b);
  margin: 0;
}

.unified-stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 20px;
  background: white;
  border: 2px solid var(--primary, #3b82f6);
  border-radius: 24px;
  font-weight: 600;
  color: var(--primary, #3b82f6);
}

/* ===== Form Sections ===== */
.unified-form-section {
  background: white;
  border-radius: var(--border-radius, 12px);
  padding: var(--spacing-xl, 32px);
  margin-bottom: var(--spacing-lg, 24px);
  box-shadow: var(--shadow, 0 4px 12px rgba(0,0,0,0.08));
  transition: all 0.3s ease;
}

.unified-form-section:hover {
  box-shadow: var(--shadow-md, 0 6px 16px rgba(0,0,0,0.12));
}

.unified-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--spacing-lg, 24px);
  padding-bottom: var(--spacing-md, 16px);
  border-bottom: 2px solid var(--border, #e2e8f0);
}

.unified-section-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary, #3b82f6), var(--secondary, #6366f1));
  color: white;
  border-radius: 50%;
  flex-shrink: 0;
}

.unified-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin: 0;
}

.unified-section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-light, #64748b);
  margin: 4px 0 0 0;
}

/* ===== Step 1: Student Selection ===== */
.unified-student-section {
  position: relative;
}

.unified-student-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin-bottom: 12px;
}

/* Student Preview Card (when using component with showPreview: false) */
.unified-student-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 20px;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.05) 0%, 
    rgba(99, 102, 241, 0.05) 100%);
  border: 2px solid var(--primary, #3b82f6);
  border-radius: var(--border-radius, 12px);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.unified-student-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary, #3b82f6), var(--secondary, #6366f1));
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  border-radius: 50%;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.unified-student-details {
  flex: 1;
}

.unified-student-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin: 0 0 8px 0;
}

.unified-student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.unified-student-id {
  font-size: 0.875rem;
  color: var(--text-muted, #94a3b8);
}

.unified-student-id strong {
  color: var(--primary, #3b82f6);
  font-family: 'Courier New', monospace;
}

.unified-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.unified-student-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  font-size: 0.875rem;
}

.unified-student-stat-icon {
  font-size: 1.125rem;
}

.unified-student-stat-label {
  color: var(--text-light, #64748b);
  font-weight: 500;
}

.unified-student-stat-value {
  color: var(--text, #1e293b);
  font-weight: 700;
}

/* ===== Step 2: Selection Details ===== */
.unified-details-section {
  position: relative;
}

.unified-form-group {
  margin-bottom: var(--spacing-lg, 24px);
}

.unified-form-group:last-child {
  margin-bottom: 0;
}

.unified-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin-bottom: 10px;
}

.unified-form-label .icon {
  font-size: 1.25rem;
}

.unified-form-label.required::after {
  content: '*';
  color: var(--error, #ef4444);
  margin-left: 4px;
}

.unified-form-input,
.unified-form-select,
.unified-form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text, #1e293b);
  background: var(--card, #ffffff);
  border: 2px solid var(--border, #e2e8f0);
  border-radius: var(--border-radius, 8px);
  transition: all 0.2s ease;
  font-family: inherit;
}

.unified-form-input:focus,
.unified-form-select:focus,
.unified-form-textarea:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.unified-form-textarea {
  min-height: 100px;
  resize: vertical;
}

.unified-form-help {
  font-size: 0.875rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 6px;
}

/* ===== Action Buttons ===== */
.unified-form-actions {
  display: flex;
  gap: 12px;
  margin-top: var(--spacing-xl, 32px);
  padding-top: var(--spacing-lg, 24px);
  border-top: 2px solid var(--border, #e2e8f0);
}

.unified-btn {
  flex: 1;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius, 8px);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.unified-btn-primary {
  background: linear-gradient(135deg, var(--primary, #3b82f6), var(--secondary, #6366f1));
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.unified-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.unified-btn-primary:active {
  transform: translateY(0);
}

.unified-btn-secondary {
  background: white;
  color: var(--text, #1e293b);
  border: 2px solid var(--border, #e2e8f0);
}

.unified-btn-secondary:hover {
  background: var(--card-hover, #f8fafc);
  border-color: var(--text-light, #64748b);
}

.unified-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== Recent Activity Section ===== */
.unified-recent-section {
  background: var(--card-hover, #f8fafc);
  border-radius: var(--border-radius, 12px);
  padding: var(--spacing-lg, 24px);
  margin-top: var(--spacing-xl, 32px);
}

.unified-recent-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.unified-recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unified-recent-item {
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid var(--primary, #3b82f6);
  font-size: 0.9375rem;
  color: var(--text-light, #64748b);
  transition: all 0.2s ease;
}

.unified-recent-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .unified-form-container {
    padding: var(--spacing-md, 16px);
  }
  
  .unified-page-header {
    padding: var(--spacing-lg, 24px);
    margin-bottom: var(--spacing-xl, 32px);
  }
  
  .unified-page-title {
    font-size: 1.5rem;
  }
  
  .unified-page-subtitle {
    font-size: 1rem;
  }
  
  .unified-form-section {
    padding: var(--spacing-lg, 24px);
  }
  
  .unified-section-title {
    font-size: 1.25rem;
  }
  
  .unified-student-card {
    flex-direction: column;
    text-align: center;
  }
  
  .unified-student-grid {
    grid-template-columns: 1fr;
  }
  
  .unified-form-actions {
    flex-direction: column;
  }
  
  .unified-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .unified-page-title {
    font-size: 1.25rem;
  }
  
  .unified-section-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .unified-student-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }
}

/* ===== Loading States ===== */
.unified-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl, 48px);
  color: var(--text-muted, #94a3b8);
}

.unified-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--primary, #3b82f6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

/* ===== Empty States ===== */
.unified-empty {
  text-align: center;
  padding: var(--spacing-2xl, 48px);
  color: var(--text-muted, #94a3b8);
}

.unified-empty-icon {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 16px;
}

.unified-empty-message {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-light, #64748b);
  margin: 0 0 8px 0;
}

.unified-empty-hint {
  font-size: 0.9375rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
