/* registro-curso.css - Estilos para el formulario de registro */
/* Ubicación: /wp-content/themes/tu-tema/registro-curso.css */

:root {
  --primary-color: #667eea;
  --primary-dark: #5a67d8;
  --success-color: #48bb78;
  --error-color: #e53e3e;
  --warning-color: #ed8936;
  --text-color: #2d3748;
  --text-light: #4a5568;
  --border-color: #e2e8f0;
  --background-light: #f7fafc;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

.registro-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

/* Loading Screen */
.loading-screen {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Access Denied */
.access-denied {
  padding: 2rem;
}

.error-card {
  background: linear-gradient(135deg, #feb2b2, #fc8181);
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.error-card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
}

.error-card p {
  margin-bottom: 1rem;
  opacity: 0.95;
}

.error-card ul {
  text-align: left;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1rem 1rem 2rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
}

.error-card li {
  margin-bottom: 0.5rem;
}

/* Form Header */
.form-header {
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.form-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.progress-step {
  padding: 0.5rem 1rem;
  background: var(--border-color);
  color: var(--text-light);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.progress-step.active {
  background: var(--success-color);
  color: white;
}

/* Form Styles */
.registro-form {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

.form-section {
  margin-bottom: 2.5rem;
}

.form-section h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--background-light);
  font-weight: 600;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid {
  border-color: var(--error-color);
}

.form-help {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  font-style: italic;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  width: 100%;
  text-align: center;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--text-light);
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--text-color);
  color: white;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.form-disclaimer {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 1rem;
  text-align: center;
}

/* Success Message */
.success-card {
  background: linear-gradient(135deg, var(--success-color), #38a169);
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.success-card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.8rem;
}

.success-card p {
  margin-bottom: 1rem;
  opacity: 0.95;
}

.success-details {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
}

.success-details p {
  margin-bottom: 0.8rem;
  text-align: left;
}

.success-details p:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .registro-container {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }
  
  .form-header {
    padding: 2rem 1.5rem;
  }
  
  .form-header h1 {
    font-size: 1.5rem;
  }
  
  .registro-form {
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .progress-bar {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .progress-step {
    width: 100%;
    text-align: center;
  }
  
  .btn-primary {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .form-header {
    padding: 1.5rem 1rem;
  }
  
  .registro-form {
    padding: 1rem;
  }
  
  .form-section h3 {
    font-size: 1.1rem;
  }
  
  .success-card,
  .error-card {
    padding: 1.5rem;
  }
}

/* Animation for form appearance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.registro-form,
.success-card,
.error-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom select styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

/* Loading state for form */
.form-loading {
  pointer-events: none;
  opacity: 0.7;
}

.form-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
