/* ============================================================
   K-Culture Elite — Application Form Modal
   Dark theme consistent with kcultureelite brand system
   ============================================================ */

/* Modal Overlay */
.kc-apply-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.kc-apply-overlay.kc-apply-open {
  display: flex;
  animation: kcApplyFadeIn 0.3s ease-out;
}
@keyframes kcApplyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Container */
.kc-apply-modal {
  background: #0A0A0A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(168, 85, 247, 0.15);
  animation: kcApplySlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes kcApplySlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Header */
.kc-apply-header {
  padding: 24px 32px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.kc-apply-title-block {
  flex: 1;
  min-width: 0;
}
.kc-apply-eyebrow {
  color: #A855F7;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.kc-apply-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.kc-apply-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.kc-apply-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: rotate(90deg);
}

/* Progress Bar */
.kc-apply-progress {
  padding: 16px 32px 0;
  flex-shrink: 0;
}
.kc-apply-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.kc-apply-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #A855F7, #C084FC);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  width: 25%;
}
.kc-apply-step-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  margin-top: 10px;
  letter-spacing: 0.03em;
}

/* Form Body (scrollable) */
.kc-apply-body {
  padding: 24px 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Steps */
.kc-apply-step {
  display: none;
  animation: kcApplyStepIn 0.3s ease-out;
}
.kc-apply-step.kc-apply-step-active {
  display: block;
}
@keyframes kcApplyStepIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.kc-apply-step-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.kc-apply-step-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Field Wrapper */
.kc-apply-field {
  margin-bottom: 18px;
}
.kc-apply-label {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.kc-apply-label .kc-apply-required {
  color: #F87171;
  margin-left: 2px;
}
.kc-apply-hint {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  margin-top: 4px;
}

/* Inputs (text, email, tel, date, url, number) */
.kc-apply-input,
.kc-apply-textarea,
.kc-apply-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 11px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.kc-apply-input::placeholder,
.kc-apply-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.kc-apply-input:focus,
.kc-apply-textarea:focus,
.kc-apply-select:focus {
  outline: none;
  border-color: #A855F7;
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
.kc-apply-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

/* Error state */
.kc-apply-input.kc-apply-invalid,
.kc-apply-textarea.kc-apply-invalid,
.kc-apply-select.kc-apply-invalid {
  border-color: #F87171;
  background: rgba(248, 113, 113, 0.05);
}
.kc-apply-error {
  color: #F87171;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}
.kc-apply-field.kc-apply-field-error .kc-apply-error {
  display: block;
}

/* Radio buttons (Gender) */
.kc-apply-radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.kc-apply-radio {
  flex: 1;
  min-width: 100px;
  position: relative;
  cursor: pointer;
}
.kc-apply-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.kc-apply-radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: center;
}
.kc-apply-radio input:checked + .kc-apply-radio-label {
  background: rgba(168, 85, 247, 0.15);
  border-color: #A855F7;
  color: #fff;
}

/* Checkbox list (Interest Tracks, Agreements) */
.kc-apply-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kc-apply-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.kc-apply-checkbox:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}
.kc-apply-checkbox input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #A855F7;
  flex-shrink: 0;
  cursor: pointer;
}
.kc-apply-checkbox-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.5;
}
.kc-apply-checkbox input:checked ~ .kc-apply-checkbox-text {
  color: #fff;
}
.kc-apply-checkbox:has(input:checked) {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.4);
}

/* Linear Scale (Korean Proficiency 1-5) */
.kc-apply-scale {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}
.kc-apply-scale-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  flex-shrink: 0;
}
.kc-apply-scale-options {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.kc-apply-scale-opt {
  position: relative;
  cursor: pointer;
}
.kc-apply-scale-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.kc-apply-scale-opt-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.kc-apply-scale-opt input:checked + .kc-apply-scale-opt-label {
  background: #A855F7;
  border-color: #A855F7;
  color: #fff;
  transform: scale(1.08);
}

/* Footer (Navigation) */
.kc-apply-footer {
  padding: 16px 32px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.kc-apply-btn {
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.kc-apply-btn-prev {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.kc-apply-btn-prev:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.kc-apply-btn-next,
.kc-apply-btn-submit {
  background: #A855F7;
  color: #fff;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
}
.kc-apply-btn-next:hover,
.kc-apply-btn-submit:hover {
  background: #C084FC;
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}
.kc-apply-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Honeypot (hidden, anti-spam) */
.kc-apply-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

/* Success Screen */
.kc-apply-success {
  padding: 40px 32px;
  text-align: center;
  display: none;
}
.kc-apply-success.kc-apply-success-active {
  display: block;
  animation: kcApplyStepIn 0.4s ease-out;
}
.kc-apply-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(192, 132, 252, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C084FC;
  font-size: 32px;
}
.kc-apply-success-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}
.kc-apply-success-text {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto 24px;
}
.kc-apply-success-next {
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 22px;
  max-width: 480px;
  margin: 0 auto 24px;
}
.kc-apply-success-next-title {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.kc-apply-success-next-list {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.7;
  padding-left: 18px;
}

/* Body lock when modal open */
body.kc-apply-lock {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 640px) {
  .kc-apply-overlay { padding: 0; }
  .kc-apply-modal {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
    max-width: 100%;
  }
  .kc-apply-header { padding: 18px 20px 14px; }
  .kc-apply-progress { padding: 12px 20px 0; }
  .kc-apply-body { padding: 20px; }
  .kc-apply-footer { padding: 14px 20px 20px; }
  .kc-apply-title { font-size: 17px; }
  .kc-apply-step-title { font-size: 16px; }
  .kc-apply-scale-opt-label { width: 36px; height: 36px; font-size: 13px; }
  .kc-apply-btn { padding: 10px 18px; font-size: 13px; }
}
