/* APACPH 2026 — register / poster-submit modal styles */

.ap-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 24, 40, 0.55);
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 48px 16px; overflow-y: auto;
  z-index: 1000;
  animation: ap-fade 160ms ease-out;
}
.ap-modal-backdrop.open { display: flex; }

@keyframes ap-fade { from { opacity: 0; } to { opacity: 1; } }

.ap-modal {
  width: 100%; max-width: 640px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;
  animation: ap-slide 180ms ease-out;
}
@keyframes ap-slide {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ap-modal header {
  padding: 20px 24px; border-bottom: 1px solid #E5E7EB;
  display: flex; align-items: center; justify-content: space-between;
}
.ap-modal header h2 {
  margin: 0; font-size: 19px; font-weight: 700; color: #0A1828;
  letter-spacing: -0.01em;
}
.ap-modal header .ap-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: #6B7280; line-height: 1; padding: 4px 8px;
}
.ap-modal header .ap-close:hover { color: #0A1828; }

.ap-modal form { padding: 24px; }
.ap-modal .ap-field { margin-bottom: 14px; }
.ap-modal .ap-row {
  display: grid; gap: 14px;
  grid-template-columns: 1fr 1fr;
}
.ap-modal label {
  display: block; font-size: 12px; font-weight: 600;
  color: #374151; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.ap-modal label .req { color: #DC2626; margin-left: 2px; }

.ap-modal input[type="text"],
.ap-modal input[type="email"],
.ap-modal input[type="tel"],
.ap-modal input[type="file"],
.ap-modal select,
.ap-modal textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  font-family: inherit;
  color: #0A1828;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ap-modal select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 36px;
  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='%236B7280' d='M6 8.5L1.5 4h9z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 10px;
  cursor: pointer;
}
.ap-modal select::-ms-expand { display: none; }

.ap-modal input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
  background: #FAFBFC;
}
.ap-modal input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}
.ap-modal input[type="file"]::-webkit-file-upload-button:hover {
  background: #F3F4F6;
}
.ap-modal input:focus,
.ap-modal select:focus,
.ap-modal textarea:focus {
  outline: none;
  border-color: #1B3250;
  box-shadow: 0 0 0 3px rgba(27, 50, 80, 0.12);
}

.ap-modal textarea { resize: vertical; min-height: 72px; }

.ap-modal .ap-check {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}
.ap-modal .ap-check input { width: 16px; height: 16px; margin: 0; }

.ap-modal .ap-hint {
  font-size: 12px; color: #6B7280; margin-top: 4px; line-height: 1.5;
}

.ap-modal .ap-amount {
  padding: 14px 16px;
  background: #F5F0EB;
  border-radius: 10px;
  margin: 16px 0;
  display: flex; justify-content: space-between; align-items: baseline;
}
.ap-modal .ap-amount-label { font-size: 12px; color: #6B7280; text-transform: uppercase; letter-spacing: 0.4px; }
.ap-modal .ap-amount-value { font-size: 22px; font-weight: 800; color: #0A1828; }
.ap-modal .ap-amount-krw { font-size: 13px; color: #6B7280; margin-left: 6px; }

.ap-modal .ap-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #E5E7EB;
  background: #FAFBFC;
}
.ap-modal .ap-btn {
  padding: 10px 18px;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.ap-modal .ap-btn-primary { background: #1B3250; color: #fff; }
.ap-modal .ap-btn-primary:hover { background: #0A1828; }
.ap-modal .ap-btn-primary:disabled { background: #9CA3AF; cursor: not-allowed; }
.ap-modal .ap-btn-ghost {
  background: transparent; color: #374151; border: 1px solid #D1D5DB;
}
.ap-modal .ap-btn-ghost:hover { background: #F3F4F6; }

.ap-modal .ap-alert {
  margin: 0 24px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.ap-modal .ap-alert-error {
  background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA;
}
.ap-modal .ap-alert-ok {
  background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0;
}

.ap-modal .ap-progress {
  height: 6px; background: #E5E7EB; border-radius: 4px; overflow: hidden;
  margin-top: 8px;
}
.ap-modal .ap-progress > div {
  height: 100%; background: #1B3250; width: 0%; transition: width 0.2s;
}

.ap-modal .ap-file-info {
  padding: 10px 12px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  display: flex; align-items: center; gap: 8px;
}
.ap-modal .ap-file-info.ok { color: #065F46; background: #ECFDF5; border-color: #A7F3D0; }

@media (max-width: 640px) {
  .ap-modal .ap-row { grid-template-columns: 1fr; }
  .ap-modal-backdrop { padding: 16px 8px; }
}
