/**
 * Registration Popup Styles
 * Modulare CSS-Datei für das Anmelde-Popup
 * Version: 1.0
 */

/* ============ ANMELDUNG POPUP STYLES ============ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.anmeldung-popup {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 10px 25px rgba(0, 0, 0, 0.1),
    0 30px 60px rgba(0, 0, 0, 0.15),
    0 50px 100px rgba(0, 0, 0, 0.12);
  position: relative;
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  border-bottom: 1px solid #e5e5e7;
}

.popup-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #6e6e73;
  margin: 0;
}

.seminar-banner {
  background: linear-gradient(135deg, rgba(110, 69, 226, 0.06) 0%, rgba(76, 183, 150, 0.04) 100%);
  padding: 14px 28px;
  text-align: center;
  border-bottom: 1px solid rgba(110, 69, 226, 0.1);
}

.seminar-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--imt-purple);
  background: rgba(110, 69, 226, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.seminar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
}

.popup-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #6e6e73;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.popup-close:hover {
  color: #1d1d1f;
}

/* ============ STEPPER ============ */
.popup-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
  position: relative;
}

.popup-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1;
  max-width: 120px;
  z-index: 2;
  cursor: pointer;
}

.popup-step:hover .popup-step-number {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup-step.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.popup-step.disabled:hover .popup-step-number {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.popup-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8e8ed 0%, #d8d8dc 100%);
  color: #6e6e73;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.popup-step.active .popup-step-number {
  background: linear-gradient(135deg, var(--imt-green) 0%, #3da585 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(76, 183, 150, 0.4), 0 0 0 4px rgba(76, 183, 150, 0.15);
  transform: scale(1.08);
}

.popup-step.completed .popup-step-number {
  background: linear-gradient(135deg, #2d2d2f 0%, #1d1d1f 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.popup-step-label {
  font-size: 0.75rem;
  color: #6e6e73;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.popup-step.active .popup-step-label {
  color: var(--imt-green);
  font-weight: 600;
}

.popup-step.completed .popup-step-label {
  color: #1d1d1f;
  font-weight: 500;
}

.popup-step-connector {
  flex: 0 0 50px;
  height: 3px;
  background: linear-gradient(90deg, #e5e5e7 0%, #d8d8dc 100%);
  margin: 0 8px;
  margin-bottom: 18px;
  transition: all 0.4s ease;
  border-radius: 2px;
}

.popup-step-connector.completed {
  background: linear-gradient(90deg, #1d1d1f 0%, #2d2d2f 100%);
}

.anmeldung-popup .mobile-stepper {
  display: none;
  text-align: center;
  padding: 12px 20px;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
  font-size: 0.85rem;
  color: #6e6e73;
}

.anmeldung-popup .mobile-stepper strong {
  color: var(--imt-green);
}

/* ============ FORM BODY ============ */
.popup-body {
  padding: 20px 28px;
}

.form-step {
  display: none;
  opacity: 0;
  transform: translateX(30px);
}

.form-step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.form-step.slide-out-left {
  animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.form-step.slide-in-left {
  animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-30px); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(30px); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ SECTION TITLES ============ */
.popup-form-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--imt-purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.popup-form-section-title .section-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  flex-shrink: 0;
}

.popup-form-section-title .section-icon path {
  fill: var(--imt-purple);
}

/* ============ ADDRESS SECTIONS ============ */
.address-section {
  background: #fafafa;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.address-section:hover {
  border-color: #d0d0d5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ============ FORM ROWS & GROUPS ============ */
.popup-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.popup-form-row.single {
  grid-template-columns: 1fr;
}

.popup-form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.popup-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.popup-form-group label .required {
  color: #dc3545;
  margin-left: 2px;
}

/* Floating Label Styles */
.popup-form-group.floating-label {
  position: relative;
  margin-top: 8px;
}

.popup-form-group.floating-label label {
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 0.95rem;
  font-weight: 400;
  color: #6e6e73;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  padding: 0 4px;
  z-index: 1;
}

.popup-form-group.floating-label .popup-form-control:focus ~ label,
.popup-form-group.floating-label .popup-form-control.has-value ~ label,
.popup-form-group.floating-label .popup-form-control:not(:placeholder-shown) ~ label {
  top: -8px;
  left: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--imt-purple);
  background: white;
}

.popup-form-group.floating-label .popup-form-control {
  padding-top: 16px;
  padding-bottom: 8px;
}

/* Success state for valid fields */
.popup-form-group.valid .popup-form-control {
  border-color: var(--imt-green);
  background: #f0fdf4;
}

/* ============ FORM CONTROLS ============ */
.popup-form-control {
  padding: 12px 14px;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: #fafafa;
}

.popup-form-control:focus {
  outline: none;
  border-color: var(--imt-purple);
  background: white;
  box-shadow: 0 0 0 3px rgba(110, 69, 226, 0.1);
}

.popup-form-control.invalid {
  border-color: #dc3545;
  background: #fff5f5;
}

.popup-form-group label.invalid-label {
  color: #dc3545;
}

.popup-select-wrapper select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236e6e73' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.popup-input-hint {
  font-size: 0.7rem;
  color: #6e6e73;
  margin-top: 4px;
}

/* ============ RADIO & CHECKBOX GROUPS ============ */
.popup-radio-group {
  margin-bottom: 16px;
}

.popup-radio-group-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #1d1d1f;
  margin-bottom: 10px;
}

.popup-radio-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popup-radio-options.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}

.popup-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.popup-radio-option input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.popup-radio-option input[type="radio"]:hover {
  border-color: var(--imt-purple);
}

.popup-radio-option input[type="radio"]:checked {
  border-color: var(--imt-purple);
  background: white;
}

.popup-radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--imt-purple);
}

.popup-checkbox-group {
  margin-bottom: 16px;
}

.popup-checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
}

.popup-checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--imt-green);
  flex-shrink: 0;
}

.popup-checkbox-option a {
  color: var(--imt-purple);
}

.popup-radio-group.invalid,
.popup-checkbox-group.invalid {
  padding: 10px;
  border-radius: 8px;
  background: #fff5f5;
  border: 1px solid #dc3545;
}

/* ============ HINTS & VALIDATION ============ */
.korrespondenz-hint {
  display: none;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff8e6;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #856404;
}

.korrespondenz-hint.show {
  display: block;
}

.validation-hint {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff5f5;
  border: 1px solid #dc3545;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #dc3545;
}

.validation-hint.show {
  display: flex;
}

/* ============ SUMMARY BOX ============ */
.summary-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #065f46;
  margin-bottom: 8px;
}

.summary-title svg {
  width: 18px;
  height: 18px;
  stroke: #065f46;
}

.summary-content {
  font-size: 0.9rem;
  color: #047857;
  line-height: 1.5;
}

/* ============ EARLY BIRD HINT ============ */
.early-bird-hint {
  display: none;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fde047;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #a16207;
}

.early-bird-hint.active {
  display: flex;
}

.early-bird-hint i {
  font-size: 1.1rem;
  color: #ca8a04;
}

/* ============ FOOTER & BUTTONS ============ */
.popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-top: 1px solid #e5e5e7;
  background: #fafafa;
  border-radius: 0 0 24px 24px;
}

.popup-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.popup-btn-placeholder {
  width: 100px;
}

.popup-btn-secondary {
  background: #f5f5f7;
  color: #1d1d1f;
}

.popup-btn-secondary:hover {
  background: #e5e5e7;
}

.popup-btn-primary {
  background: linear-gradient(135deg, var(--imt-green) 0%, #3da585 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.popup-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 183, 150, 0.3);
}

.popup-btn-primary .btn-progress {
  font-size: 0.75rem;
  opacity: 0.8;
}

.popup-btn-submit {
  background: linear-gradient(135deg, var(--imt-green) 0%, #3da585 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.popup-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 183, 150, 0.3);
}

.popup-btn-submit svg {
  width: 18px;
  height: 18px;
}

/* ============ SUCCESS STATE ============ */
.success-state {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.success-state.active {
  display: block;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--imt-green) 0%, #3da585 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  stroke: white;
}

.success-state h3 {
  font-size: 1.5rem;
  color: #1d1d1f;
  margin-bottom: 12px;
}

.success-state p {
  color: #6e6e73;
  margin-bottom: 8px;
}

/* ==================== MOBILE OPTIMIERUNGEN ==================== */

@media (max-width: 768px) {
  .anmeldung-popup {
    max-width: 100%;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    margin: 0;
  }
  
  .popup-header {
    padding: 12px 16px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
  }
  
  .popup-header h2 {
    font-size: 1rem;
  }
  
  .seminar-banner {
    padding: 10px 16px;
  }
  
  .seminar-title {
    font-size: 1.1rem;
  }
  
  .seminar-badge {
    font-size: 0.6rem;
  }
  
  .popup-stepper {
    padding: 12px 16px;
  }
  
  .popup-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .popup-step-label {
    font-size: 0.65rem;
  }
  
  .popup-step-connector {
    flex: 0 0 20px;
    margin: 0 4px;
  }
  
  .popup-body {
    padding: 16px;
    min-height: calc(100vh - 280px);
  }
  
  .popup-form-group label {
    font-size: 0.8rem;
  }
  
  .popup-form-control {
    padding: 10px 12px;
    font-size: 16px !important; /* Prevents iOS zoom on input focus */
  }
  
  .popup-input-hint {
    font-size: 0.7rem;
  }
  
  .popup-radio-group-label {
    font-size: 0.8rem;
  }
  
  .popup-radio-option,
  .popup-checkbox-option {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .address-section {
    padding: 14px;
    margin-bottom: 14px;
  }
  
  .popup-form-section-title {
    font-size: 0.8rem;
    margin-bottom: 12px;
    padding-bottom: 6px;
  }
  
  .summary-box {
    padding: 12px;
  }
  
  .summary-title {
    font-size: 0.85rem;
  }
  
  .summary-content {
    font-size: 0.85rem;
  }
  
  .early-bird-hint {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  
  .popup-footer {
    padding: 12px 16px;
    position: sticky;
    bottom: 0;
    background: #fafafa;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }
  
  .popup-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .popup-btn-placeholder {
    width: 70px;
  }
  
  .popup-btn-submit {
    padding: 12px 20px;
  }
  
  .success-icon {
    width: 60px;
    height: 60px;
  }
  
  .success-state h3 {
    font-size: 1.3rem;
  }
}

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

@media (max-width: 480px) {
  .popup-header h2 {
    font-size: 0.9rem;
  }
  
  .popup-close {
    font-size: 1.5rem;
  }
  
  .seminar-title {
    font-size: 1rem;
  }
  
  .popup-body {
    padding: 14px;
  }
  
  .popup-form-row {
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .popup-radio-group,
  .popup-checkbox-group {
    margin-bottom: 14px;
  }
  
  .popup-footer {
    justify-content: space-between;
    gap: 8px;
  }
  
  .popup-btn-placeholder {
    display: none;
  }
  
  #backBtn {
    padding: 10px 16px;
  }
  
  #nextBtn,
  #submitBtn {
    padding: 10px 20px;
    flex: none;
    width: auto;
  }
  
  .popup-step-connector {
    flex: 0 0 30px;
  }
  .popup-step-label {
    font-size: 0.65rem;
  }
  .popup-step-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .popup-step {
    max-width: 90px;
  }
}

@media (max-width: 400px) {
  .popup-stepper { display: none; }
  .anmeldung-popup .mobile-stepper { display: block; }
}

@media (max-width: 360px) {
  .popup-body {
    padding: 12px;
  }
  
  .popup-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}
