/* ============================================================
   TRAINING REGISTRATION MODAL STYLES
   ============================================================ */

/* Training Modal Overlay */
.training-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(29, 53, 87, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.training-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Training Modal */
.training-modal {
  background-color: #ffffff;
  border-radius: 12px;
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.training-overlay.active .training-modal {
  transform: scale(1) translateY(0);
}

/* Training Modal Header */
.training-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 2px solid #f0f4f8;
  background: linear-gradient(135deg, var(--ocean-navy) 0%, #3d5a80 100%);
  color: #ffffff;
}

.training-header h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
}

.training-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.training-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Training Modal Body */
.training-body {
  max-height: calc(85vh - 100px);
  overflow-y: auto;
  padding: 32px;
}

/* Training Panel */
.tpanel {
  animation: fadeIn 0.3s ease;
}

.tpanel.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Training Panel Heading */
.tpanel-heading {
  text-align: center;
  margin-bottom: 32px;
}

.tpanel-heading h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--ocean-navy);
  margin-bottom: 12px;
}

.tpanel-heading p {
  color: var(--slate);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Training Sessions */
.training-sessions {
  display: grid;
  gap: 16px;
}

.training-session {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.training-session:hover {
  border-color: var(--leaf-green);
  background: #f0f9f4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.training-session.active {
  border-color: var(--leaf-green);
  background: #e8f5e9;
  box-shadow: 0 0 0 3px rgba(46, 125, 90, 0.15);
}

.session-info h4 {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--ocean-navy);
  font-weight: 600;
}

.session-info p {
  margin: 0 0 8px;
  color: var(--slate);
  font-size: 0.95rem;
}

.session-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.session-type.online {
  background-color: #dbeafe;
  color: #1e40af;
}

.session-type.in-person {
  background-color: #d1fae5;
  color: #065f46;
}

.session-price {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--leaf-green);
}

/* Training Form */
.training-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--slate);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--slate);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--leaf-green);
  box-shadow: 0 0 0 3px rgba(46, 125, 90, 0.15);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23333333" d="M6 9L1 4h10L6 9z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

.form-actions .btn {
  flex: 1;
  max-width: 200px;
  text-align: center;
}

/* Payment Loading */
.payment-loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #f3f4f6;
  border-top: 4px solid var(--leaf-green);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.payment-loading p {
  color: var(--slate);
  font-size: 1.1rem;
}

/* Success Content */
.success-content {
  text-align: center;
  padding: 20px;
}

.success-content i {
  font-size: 4rem;
  color: var(--leaf-green);
  margin-bottom: 20px;
}

.success-content p {
  color: var(--slate);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.success-content .btn {
  margin-top: 20px;
}

.error-message {
  text-align: center;
  color: #dc2626;
}

.error-message i {
  font-size: 3rem;
  margin-bottom: 16px;
}

.error-message p {
  margin-bottom: 8px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .training-modal {
    width: 95%;
    max-height: 90vh;
  }

  .training-header {
    padding: 20px 24px;
  }

  .training-header h2 {
    font-size: 1.5rem;
  }

  .training-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
  }

  .tpanel-heading h3 {
    font-size: 1.5rem;
  }

  .training-session {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .session-price {
    font-size: 1.25rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .training-header {
    padding: 16px 20px;
  }

  .training-header h2 {
    font-size: 1.25rem;
  }

  .training-body {
    padding: 20px;
  }
}