/**
 * Akıllı Fotoğraf Yarışması — Frontend Form CSS
 * Webnasyon Geist UI Sistemine uygun
 * 
 * Renk paleti: Gradient (pembe #e040fb → mor #7c3aed → mavi #2563eb)
 * Tipografi: Inter (Google Fonts)
 */

/* ========================================
   1. DESIGN TOKENS
   ======================================== */
:root {
  --afy-font-sans: var(--us-font-body, 'Inter'), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Renkler */
  --afy-white:       #ffffff;
  --afy-bg:          #ffffff;
  --afy-bg-subtle:   var(--color-content-bg-alt, #faf9f5); /* Çok hafif krem veya alternatif arka plan */
  --afy-border:      var(--color-content-border, #e5e3dd);
  --afy-border-dark: var(--color-content-border-active, #c4c1b9);
  --afy-foreground:  var(--color-content-text, #1f2937); /* Koyu antrasit veya ana metin rengi */
  --afy-muted:       var(--color-content-text-hover, #4b5563);
  --afy-muted-light: #9ca3af;

  /* Brand / İstanbul Foto Festival Renkleri (Sarı & Bordo) */
  --afy-brand:         var(--color-content-secondary, #f1ab1a); /* Sıcak Sarı veya ikincil renk */
  --afy-brand-hover:   var(--color-content-secondary-hover, #d9940e);
  --afy-brand-bg:      #fefaf0;
  --afy-brand-bg-light:#fffdf9;
  --afy-border-focus:  var(--color-content-primary, #8c1f21); /* Odaklanmada Bordo border */
  --afy-brand-text:    var(--color-content-text, #1f2937);

  /* İkincil Renk (Bordo) */
  --afy-secondary:       var(--color-content-primary, #8c1f21);
  --afy-secondary-hover: var(--color-content-primary-hover, #731719);

  /* Brand gradient */
  --afy-gradient:    linear-gradient(90deg, #f1ab1a 0%, #8c1f21 100%);
  --afy-gradient-btn:linear-gradient(135deg, #8c1f21 0%, #731719 100%);

  /* Durum renkleri */
  --afy-success:        #059669;
  --afy-success-bg:     #ecfdf5;
  --afy-success-border: #6ee7b7;
  
  --afy-error:          #dc2626;
  --afy-error-bg:       #fef2f2;
  --afy-error-border:   #fca5a5;
  
  --afy-warning:        #d97706;
  --afy-warning-bg:     #fffbeb;

  /* Layout */
  --afy-radius:      8px;
  --afy-radius-lg:   12px;
  --afy-shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --afy-shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --afy-shadow-lg:   0 10px 40px rgba(0,0,0,.12);
  --afy-shadow-input:inset 0 1px 2px rgba(0,0,0,0.015);
  --afy-shadow-focus:0 4px 14px rgba(241, 171, 26, 0.15), inset 0 0 0 1px var(--afy-secondary);
  --afy-shadow-error:0 0 0 3px rgba(220, 38, 38, 0.1);
  --afy-transition:  0.2s ease;
}

/* ========================================
   2. WRAPPER & FORM CONTAINER
   ======================================== */
.afy-form-wrapper {
  font-family: var(--afy-font-sans);
  color: var(--afy-foreground);
  max-width: 760px;
  margin: 40px auto;
  -webkit-font-smoothing: antialiased;
}

.afy-form-card {
  background: var(--afy-bg);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 24px !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
  padding: 56px;
  margin-top: 24px;
  position: relative;
}

@media (max-width: 640px) {
  .afy-form-card {
    padding: 32px 24px;
    border-radius: 16px !important;
  }
}

/* ========================================
   3. HEADER
   ======================================== */
.afy-form-header {
  margin-bottom: 32px;
}

.afy-form-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--afy-foreground);
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.afy-form-description {
  font-size: 15px;
  line-height: 1.65;
  color: var(--afy-muted);
  margin: 0;
}

.afy-form-description strong {
  color: var(--afy-foreground);
  font-weight: 600;
}

/* ========================================
   4. PROGRESS BAR
   ======================================== */
.afy-progress-wrapper {
  margin: 20px 0 36px 0;
}

.afy-progress-label,
.afy-progress-track,
.afy-progress-fill {
  display: none !important;
}

/* İlerleme adımları */
.afy-progress-steps {
  display: flex;
  gap: 0;
  counter-reset: step;
}

.afy-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.afy-step-dot::before {
  content: counter(step);
  counter-increment: step;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f8fafc !important;
  border: 2px solid #e2e8f0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8 !important;
  transition: all var(--afy-transition);
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.afy-step-dot.active::before {
  background: #ffffff !important;
  border-color: #8c1f21 !important;
  color: #8c1f21 !important;
  box-shadow: 0 4px 10px rgba(140, 31, 33, 0.08);
}

.afy-step-dot.done::before {
  background: #8c1f21 !important;
  border-color: #8c1f21 !important;
  color: #ffffff !important;
  content: '\2713';
  box-shadow: 0 4px 10px rgba(140, 31, 33, 0.15);
}

.afy-step-dot.active,
.afy-step-dot.done {
  cursor: pointer;
}

.afy-step-dot.done:hover::before {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(140, 31, 33, 0.2);
}

.afy-step-dot-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
  transition: color var(--afy-transition);
}

.afy-step-dot.active .afy-step-dot-label {
  color: #1e293b;
}

.afy-step-dot.done .afy-step-dot-label {
  color: #8c1f21;
}

.afy-step-dot:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
  transition: background var(--afy-transition);
}

.afy-step-dot.done:not(:last-child)::after {
  background: #8c1f21;
}

/* ========================================
   5. FORM STEPS (show/hide)
   ======================================== */
.afy-step {
  display: none;
  animation: afy-step-in 0.3s ease forwards;
}

.afy-step.active {
  display: block;
}

@keyframes afy-step-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   6. SECTION TITLES
   ======================================== */
.afy-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--afy-foreground);
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

.afy-section-divider {
  height: 1px;
  background: var(--afy-border);
  margin: 20px 0 28px 0;
}

/* ========================================
   7. TERMS CONTENT
   ======================================== */
.afy-terms-box {
  background: var(--afy-bg-subtle);
  border: 1px solid var(--afy-border);
  border-radius: 12px !important;
  padding: 28px;
  margin: 20px 0 24px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--afy-muted);
  max-height: 380px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* Custom scrollbar */
.afy-terms-box::-webkit-scrollbar {
  width: 6px;
}
.afy-terms-box::-webkit-scrollbar-track {
  background: transparent;
}
.afy-terms-box::-webkit-scrollbar-thumb {
  background: var(--afy-border-dark, #c4c1b9);
  border-radius: 99px;
}
.afy-terms-box::-webkit-scrollbar-thumb:hover {
  background: var(--afy-muted-light, #9ca3af);
}

.afy-terms-box h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--afy-foreground);
  margin: 24px 0 12px 0;
  letter-spacing: -0.3px;
  line-height: 1.4;
}

.afy-terms-box h3:first-child {
  margin-top: 0;
}

.afy-terms-box h4 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--afy-foreground);
  margin: 18px 0 8px 0;
  line-height: 1.4;
}

.afy-terms-box p {
  margin: 0 0 14px 0;
}

.afy-terms-box p:last-child {
  margin-bottom: 0;
}

.afy-terms-box ul,
.afy-terms-box ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.afy-terms-box li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.afy-terms-box li:last-child {
  margin-bottom: 0;
}

/* ========================================
   8. FORM CONTROLS
   ======================================== */
.afy-form-group {
  margin-bottom: 20px;
}

.afy-form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--afy-foreground);
  margin-bottom: 8px;
  letter-spacing: -0.1px;
}

.afy-form-label .afy-required {
  color: var(--afy-error);
  margin-left: 3px;
  font-weight: 700;
}

.afy-form-input,
.afy-form-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--afy-bg) !important;
  border: 1.5px solid var(--afy-border) !important;
  border-radius: 12px !important;
  font-family: var(--afy-font-sans);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--afy-foreground) !important;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.015);
}

.afy-form-input::placeholder {
  color: var(--afy-muted-light);
  opacity: 0.8;
}

.afy-form-input:hover,
.afy-form-select:hover {
  background: var(--afy-border) !important;
  border-color: rgba(0,0,0,0.05) !important;
}

.afy-form-input:focus,
.afy-form-select:focus {
  background: var(--afy-bg) !important;
  border-color: var(--afy-border-focus) !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12), inset 0 0 0 1px var(--afy-border-focus) !important;
}

.afy-form-input.error,
.afy-form-select.error {
  border-color: var(--afy-error) !important;
  background: var(--afy-error-bg) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.afy-form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  padding-right: 44px;
  cursor: pointer;
}

.afy-field-error {
  font-size: 12px;
  color: var(--afy-error);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.afy-field-hint {
  font-size: 12px;
  color: var(--afy-muted-light);
  margin-top: 5px;
}

/* Checkbox */
.afy-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
}

.afy-checkbox,
.afy-checkbox-input {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  margin-top: 2px !important;
  padding: 0 !important;
  cursor: pointer;
  accent-color: var(--afy-brand) !important;
  flex-shrink: 0 !important; /* Prevents flex stretching */
  -webkit-appearance: checkbox !important;
  appearance: auto !important; /* Overrides theme custom pseudo-checkboxes that break layout */
  box-shadow: none !important;
  background-image: none !important;
}

.afy-checkbox::before,
.afy-checkbox::after,
.afy-checkbox-input::before,
.afy-checkbox-input::after {
  display: none !important;
  content: none !important;
}

.afy-checkbox-label {
  font-size: 14px;
  color: var(--afy-foreground);
  cursor: pointer;
  line-height: 1.5;
}

/* ========================================
   9. PARTICIPATION PACKAGES
   ======================================== */
.afy-packages-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--afy-foreground);
  margin-bottom: 12px;
  letter-spacing: 0.1px;
}

.afy-packages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 480px) {
  .afy-packages-grid {
    grid-template-columns: 1fr;
  }
}

.afy-package-card {
  position: relative;
  border: 1.5px solid var(--afy-border);
  border-radius: var(--afy-radius) !important;
  padding: 16px 18px;
  cursor: pointer;
  transition: all var(--afy-transition);
  background: var(--afy-bg);
  user-select: none;
}

.afy-package-card:hover {
  border-color: var(--afy-brand-hover);
  background: var(--afy-brand-bg-light);
  transform: translateY(-1px);
  box-shadow: var(--afy-shadow-sm);
}

.afy-package-card.selected {
  border-color: var(--afy-brand);
  background: var(--afy-brand-bg);
  box-shadow: 0 0 0 3px rgba(241, 171, 26, 0.15); /* Will refactor into token later if needed */
}

.afy-package-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.afy-package-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.afy-package-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--afy-foreground);
  margin-bottom: 4px;
}

.afy-package-desc {
  font-size: 12px;
  color: var(--afy-muted);
  margin-bottom: 10px;
}

.afy-package-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--afy-brand);
  letter-spacing: -0.5px;
}

.afy-package-price .afy-currency {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}

.afy-package-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--afy-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all var(--afy-transition);
}

.afy-package-card.selected .afy-package-check {
  opacity: 1;
  transform: scale(1);
}

.afy-package-check svg {
  width: 12px;
  height: 12px;
  stroke: var(--afy-white);
}

.afy-package-hint {
  font-size: 12px;
  color: var(--afy-muted-light);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ========================================
   10. PHOTO UPLOAD ZONE
   ======================================== */
.afy-upload-area {
  margin-bottom: 20px;
}

.afy-upload-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--afy-foreground);
  margin-bottom: 8px;
  display: block;
}

.afy-upload-zone {
  position: relative;
  border: 2px dashed var(--afy-border);
  border-radius: var(--afy-radius) !important;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--afy-transition);
  background: var(--afy-bg-subtle);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.afy-upload-zone:hover,
.afy-upload-zone.drag-over {
  border-color: var(--afy-brand);
  background: var(--afy-brand-bg);
}

.afy-upload-zone.has-file {
  border-style: solid;
  border-color: var(--afy-success);
  background: var(--afy-success-bg);
}

.afy-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.afy-upload-icon {
  font-size: 32px;
  line-height: 1;
  opacity: 0.5;
}

.afy-upload-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--afy-foreground);
}

.afy-upload-hint {
  font-size: 11px;
  color: var(--afy-muted-light);
}

.afy-upload-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--afy-success);
  cursor: pointer;
  transition: transform var(--afy-transition), box-shadow var(--afy-transition);
}

.afy-upload-preview:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.afy-upload-filename {
  font-size: 12px;
  font-weight: 500;
  color: var(--afy-success);
  margin-top: 4px;
  word-break: break-all;
  line-height: 1.4;
}

.afy-btn-review {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 10px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  font-family: var(--afy-font-sans) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--afy-foreground) !important;
  background: var(--afy-white) !important;
  border: 1px solid var(--afy-border) !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all var(--afy-transition) !important;
  box-shadow: var(--afy-shadow-sm) !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 10 !important;
}

.afy-btn-review:hover {
  background: var(--afy-bg-subtle) !important;
  border-color: var(--afy-border-dark) !important;
  color: var(--afy-secondary) !important;
}

.afy-btn-review:active {
  transform: scale(0.97) !important;
}

.afy-btn-review .dashicons {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.afy-upload-loader {
  width: 24px;
  height: 24px;
  border: 3px solid var(--afy-border);
  border-top-color: var(--afy-brand);
  border-radius: 50%;
  animation: afy-spin 0.8s linear infinite;
}

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

.afy-photo-title-wrapper {
  margin-top: 12px;
  display: none; /* JS handles sliding/fading in */
}

.afy-photo-title-container {
  position: relative;
  width: 100%;
}

.afy-photo-title-input {
  height: 40px !important;
  padding: 0 52px 0 12px !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
}

.afy-char-counter {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--afy-muted-light);
  font-weight: 500;
  pointer-events: none;
  transition: color 0.15s ease;
  user-select: none;
}

.afy-char-counter.warning {
  color: var(--afy-warning);
}

.afy-char-counter.error {
  color: var(--afy-error);
}

.afy-photo-desc-wrapper {
  margin-top: 10px;
  display: none; /* JS handles sliding/fading in */
}

.afy-photo-desc-container {
  position: relative;
  width: 100%;
}

.afy-photo-desc-input {
  height: 80px !important;
  min-height: 80px !important;
  max-height: 150px !important;
  padding: 10px 52px 10px 12px !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
  resize: vertical;
  line-height: 1.5 !important;
  box-sizing: border-box;
}

.afy-photo-desc-container .afy-char-counter {
  top: auto;
  bottom: 12px;
  transform: none;
}


/* ========================================
   11. PRICE SUMMARY
   ======================================== */
.afy-price-summary {
  border: 1px solid var(--afy-border);
  border-radius: var(--afy-radius) !important;
  padding: 20px 24px;
  margin: 28px 0 8px 0;
  background: var(--afy-bg-subtle);
}

.afy-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.afy-price-row + .afy-price-row {
  border-top: 1px solid var(--afy-border);
}

.afy-price-key {
  font-size: 13px;
  color: var(--afy-muted);
  font-weight: 500;
}

.afy-price-value {
  font-size: 13px;
  color: var(--afy-foreground);
  font-weight: 600;
}

.afy-price-total .afy-price-key {
  font-size: 15px;
  font-weight: 700;
  color: var(--afy-foreground);
}

.afy-price-total .afy-price-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--afy-brand);
  letter-spacing: -0.5px;
}

/* ========================================
   12. BUTTONS
   ======================================== */
.afy-btn-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
}

.afy-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 46px;
  padding: 0 24px;
  border-radius: var(--afy-radius) !important;
  font-family: var(--afy-font-sans) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: none !important;
  outline: none !important;
  transition: all var(--afy-transition) !important;
  text-decoration: none !important;
  user-select: none !important;
  letter-spacing: 0.1px !important;
  line-height: 1.2 !important;
}

.afy-btn-primary {
  background: var(--afy-gradient-btn) !important;
  color: var(--afy-white) !important;
  box-shadow: 0 4px 12px rgba(140, 31, 33, 0.25);
}

.afy-btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(140, 31, 33, 0.35);
}

.afy-btn-primary:active {
  transform: translateY(0);
}

.afy-btn-primary:disabled,
.afy-btn-primary.loading {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.afy-btn-secondary {
  background: var(--afy-bg) !important;
  color: var(--afy-foreground) !important;
  border: 1.5px solid var(--afy-border) !important;
}

.afy-btn-secondary:hover {
  border-color: var(--afy-border-dark);
  background: var(--afy-bg-subtle);
}

.afy-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
}

/* ========================================
   13. ALERTS & MESSAGES
   ======================================== */
.afy-alert {
  padding: 14px 18px;
  border-radius: var(--afy-radius) !important;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  border: 1px solid transparent;
  line-height: 1.5;
}

.afy-alert-error {
  background: var(--afy-error-bg);
  color: var(--afy-error);
  border-color: var(--afy-error-border);
}

.afy-alert-success {
  background: var(--afy-success-bg);
  color: var(--afy-success);
  border-color: var(--afy-success-border);
}

.afy-alert-info {
  background: var(--afy-bg-subtle);
  color: var(--afy-muted);
  border-color: var(--afy-border);
}

.afy-alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ========================================
   14. SUCCESS PAGE
   ======================================== */
.afy-success-wrapper {
  text-align: center;
  padding: 48px 24px;
}

.afy-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--afy-success-bg);
  border: 2px solid var(--afy-success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
}

.afy-success-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--afy-foreground);
  margin: 0 0 12px 0;
}

.afy-success-subtitle {
  font-size: 15px;
  color: var(--afy-muted);
  margin: 0 0 28px 0;
  line-height: 1.65;
}

.afy-reference-box {
  display: inline-block;
  background: var(--afy-bg-subtle);
  border: 1.5px solid var(--afy-border);
  border-radius: var(--afy-radius);
  padding: 12px 28px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--afy-brand);
  letter-spacing: 2px;
  margin: 0 auto 28px;
}

/* ========================================
   15. PAYMENT IFRAME
   ======================================== */
.afy-payment-iframe-wrapper {
  border: 1px solid var(--afy-border);
  border-radius: var(--afy-radius);
  overflow: hidden;
  margin-top: 16px;
}

/* ========================================
   16. LOADING SPINNER
   ======================================== */
.afy-global-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 16px;
  font-family: var(--afy-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--afy-muted);
}

.afy-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--afy-border);
  border-top-color: var(--afy-brand);
  border-radius: 50%;
  animation: afy-spin 0.8s linear infinite;
}

/* ========================================
   17. RESPONSIVE TWEAKS
   ======================================== */
@media (max-width: 640px) {
  .afy-form-title {
    font-size: 22px;
  }

  .afy-btn-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .afy-btn {
    width: 100%;
    justify-content: center;
  }

  .afy-packages-grid {
    grid-template-columns: 1fr;
  }

  .afy-price-summary {
    padding: 16px;
  }
}

/* ========================================
   18. LANGUAGE SWITCHER
   ======================================== */
.afy-lang-switcher {
    position: absolute;
    top: 32px;
    right: 32px;
    display: inline-flex;
    gap: 4px;
    background: var(--afy-border);
    padding: 6px;
    border: none;
    border-radius: 99px;
    z-index: 10;
}

.afy-lang-btn {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 99px;
    color: var(--afy-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    letter-spacing: 0.5px;
}

.afy-lang-btn.active {
    background: var(--afy-bg);
    color: var(--afy-foreground);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

[data-active-lang="tr"] .afy-lang-en { display: none !important; }
[data-active-lang="en"] .afy-lang-tr { display: none !important; }

/* Unified Header Actions (Log In and Language Switcher) */
.afy-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: 12px;
    box-sizing: border-box;
}

.afy-header-actions .afy-lang-switcher {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    padding: 3px !important;
    height: 34px !important;
    box-sizing: border-box;
    align-items: center;
    margin: 0 !important;
}

.afy-header-actions .afy-lang-btn {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    height: 28px !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.afy-portal-shortcut-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    height: 34px !important;
    box-sizing: border-box;
    border-radius: 99px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border: 1px solid var(--afy-border) !important;
    background: var(--afy-white) !important;
    color: var(--afy-foreground) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--afy-shadow-sm) !important;
}

.afy-portal-shortcut-btn:hover {
    background: var(--afy-bg-subtle) !important;
    border-color: var(--afy-border-dark) !important;
    color: var(--afy-secondary) !important;
}

.afy-portal-shortcut-btn .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 16px !important;
    margin: 0 !important;
}

@media (max-width: 640px) {
    .afy-header-actions {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding-bottom: 12px;
        margin-bottom: 20px;
    }
}

/* ========================================
   12. FRONTEND TOAST NOTIFICATION
   ======================================== */
.afy-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.afy-toast {
    background: var(--afy-bg);
    border: 1px solid var(--afy-border);
    border-radius: var(--afy-radius);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--afy-foreground);
    pointer-events: auto;
    transform: translateY(100%);
    opacity: 0;
    animation: afy-toast-slide-up 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.afy-toast.fade-out {
    animation: afy-toast-fade-out 0.3s ease forwards;
}

.afy-toast.error {
    border-left: 4px solid var(--afy-error);
}
.afy-toast.error .afy-toast-icon {
    color: var(--afy-error);
}

.afy-toast.success {
    border-left: 4px solid var(--afy-primary);
}
.afy-toast.success .afy-toast-icon {
    color: var(--afy-primary);
}

@keyframes afy-toast-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes afy-toast-fade-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(10px);
        opacity: 0;
    }
}

/* ========================================
   13. CHECKBOX ALIGNMENT FIX
   ======================================== */
.afy-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
    padding: 12px;
    background: var(--afy-bg-subtle);
    border: 1px solid var(--afy-border);
    border-radius: var(--afy-radius);
}

.afy-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--afy-primary);
}

.afy-checkbox-label {
    font-size: 13px;
    line-height: 1.6;
    color: var(--afy-foreground);
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

/* ========================================
   14. UX SHAKE ANIMATION
   ======================================== */
.afy-shake {
    animation: afy-shake-animation 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes afy-shake-animation {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ========================================
   15. FLOATING SUPPORT WIDGET
   ======================================== */
.afy-support-floating {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  background-color: var(--afy-foreground) !important;
  color: var(--afy-background) !important;
  border-radius: 50px !important;
  padding: 12px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
  font-family: var(--afy-font-sans) !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  z-index: 9999 !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
}

.afy-support-floating:hover, 
.afy-support-floating:focus, 
.afy-support-floating:active {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2) !important;
  color: var(--afy-background) !important;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
}

.afy-support-floating.whatsapp {
  background-color: #25D366 !important; /* Official WhatsApp Green */
  color: #ffffff !important;
}

.afy-support-floating svg {
  flex-shrink: 0 !important;
  stroke: currentColor !important;
  fill: none !important;
}

@media (max-width: 768px) {
  .afy-support-floating {
    bottom: 20px !important;
    right: 20px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
}

/* ========================================
   16. BUTTON SHIMMER (ACTION BUTTONS)
   ======================================== */
.afy-btn-primary {
  position: relative !important;
  overflow: hidden !important;
}

.afy-btn-primary::after {
  display: none !important;
}

/* ========================================
   17. TRUST BADGES
   ======================================== */
.afy-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    padding: 24px;
    background: var(--afy-bg);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.afy-trust-badge-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--afy-foreground);
    transition: all var(--afy-transition);
}

.afy-trust-badge-item[href]:hover,
.afy-trust-badge-clickable:hover {
    transform: translateY(-2px);
}

.afy-trust-badge-item img {
    width: auto;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
}

.afy-trust-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--afy-brand-bg);
    color: var(--afy-brand);
    border-radius: 12px;
}

.afy-trust-badge-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--afy-muted);
}

.afy-trust-badge-item[href] .afy-trust-badge-text {
    color: var(--afy-brand);
}

@media (max-width: 640px) {
    .afy-trust-badges {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

/* ========================================
   18. CUSTOM SELECT DROPDOWN (VERCEL STYLE)
   ======================================== */
.afy-custom-select-wrapper {
  position: relative;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.afy-custom-select-trigger {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--afy-bg) !important;
  border: 1.5px solid var(--afy-border) !important;
  border-radius: 12px !important;
  font-family: var(--afy-font-sans);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--afy-foreground) !important;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.015);
}

.afy-custom-select-trigger:hover {
  background: var(--afy-bg-subtle) !important;
  border-color: var(--afy-border-dark) !important;
}

/* Active / Open state styling */
.afy-custom-select-wrapper.active .afy-custom-select-trigger {
  background: var(--afy-bg) !important;
  border-color: var(--afy-border-focus) !important;
  box-shadow: 0 4px 14px rgba(140, 31, 33, 0.12), inset 0 0 0 1px var(--afy-border-focus) !important;
}

.afy-custom-select-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.afy-custom-select-arrow {
  display: block;
  width: 12px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.afy-custom-select-wrapper.active .afy-custom-select-arrow {
  transform: rotate(180deg);
}

/* Dropdown Options Box */
.afy-custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--afy-bg);
  border: 1.5px solid var(--afy-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  max-height: 260px;
  overflow-y: auto;
  z-index: 99999;
  padding: 6px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
}

.afy-custom-select-wrapper.active .afy-custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Option Items */
.afy-custom-select-option {
  padding: 10px 14px;
  font-family: var(--afy-font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--afy-foreground);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afy-custom-select-option:hover {
  background: var(--afy-bg-subtle);
  color: var(--afy-secondary);
}

.afy-custom-select-option.placeholder {
  color: var(--afy-muted-light);
  cursor: default;
}

.afy-custom-select-option.placeholder:hover {
  background: transparent;
  color: var(--afy-muted-light);
}

/* Selected state styling */
.afy-custom-select-option.selected {
  background: var(--afy-brand-bg) !important;
  color: var(--afy-secondary) !important;
  font-weight: 600;
}

/* Error state styling */
.afy-custom-select-wrapper.error .afy-custom-select-trigger {
  border-color: var(--afy-error) !important;
  background: var(--afy-error-bg) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Scrollbar styling for the dropdown */
.afy-custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}
.afy-custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.afy-custom-select-dropdown::-webkit-scrollbar-thumb {
  background: var(--afy-border-dark);
  border-radius: 99px;
}
.afy-custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--afy-muted-light);
}

/* Hide footer on contestant portal page (Impreza & other themes) */
.afy-portal-page .l-footer,
.afy-portal-page #page-footer,
.afy-portal-page footer {
  display: none !important;
}

/* ========================================
   18. TERMS SCROLL TO READ VALIDATION
   ======================================== */
.afy-scroll-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: var(--afy-font-sans);
  font-size: 13.5px;
  font-weight: 500;
  margin: -12px 0 20px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
}

.afy-scroll-indicator .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 18px;
}

/* Locked state (Warning) */
.afy-scroll-indicator.locked {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.afy-scroll-indicator.locked .dashicons {
  animation: afy-bounce-down 1.5s infinite ease-in-out;
}

/* Unlocked state (Success) */
.afy-scroll-indicator.unlocked {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

/* Glow effect when unlocked */
.afy-checkbox-group.unlocked-glow {
  animation: afy-pulse-green 1.5s ease-in-out;
}

/* Animations */
@keyframes afy-bounce-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

@keyframes afy-pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    border-color: #10b981;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Label states */
.afy-checkbox-label.afy-disabled {
  pointer-events: none;
}


