/* ==========================================================================
   Katanyu Payment Confirmation Form - Premium Design System
   ========================================================================== */

.kpc-form-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 36px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.05);
  font-family: inherit;
  box-sizing: border-box;
}

/* Header */
.kpc-form-header {
  text-align: start;
  margin-bottom: 32px;
}

.kpc-header-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #fdfbf7;
  border: 1px solid #e8d7b9;
  color: #43593b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(67, 89, 59, 0.08);
}

.kpc-form-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #121212;
  margin: 0 0 6px 0;
}

.kpc-form-subtitle {
  font-size: 0.96rem;
  color: #626262;
  margin: 0;
}

/* Section Dividers */
.kpc-section {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
}

.kpc-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaeaea;
}

.kpc-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #43593b;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpc-section-title h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #43593b;
}

/* Form Grid */
.kpc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.kpc-field-group {
  display: flex;
  flex-direction: column;
}

.kpc-field-group.kpc-full-width {
  grid-column: span 2;
}

.kpc-field-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
}

.kpc-required {
  color: #e53e3e;
}

.kpc-field-group input[type="text"],
.kpc-field-group input[type="number"],
.kpc-field-group input[type="email"],
.kpc-field-group input[type="date"],
.kpc-field-group input[type="time"],
.kpc-field-group select,
.kpc-field-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  font-size: 0.95rem;
  color: #121212;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.kpc-field-group input:focus,
.kpc-field-group select:focus,
.kpc-field-group textarea:focus {
  background-color: #ffffff;
  border-color: #43593b;
  box-shadow: 0 0 0 3px rgba(67, 89, 59, 0.12);
  outline: none;
}

/* Bank Radio Chip Buttons Grid */
.kpc-bank-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.kpc-bank-chip {
  cursor: pointer;
  display: block;
  user-select: none;
}

.kpc-bank-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kpc-chip-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.kpc-bank-chip:hover .kpc-chip-card {
  border-color: #acad79;
  background: #fdfbf7;
}

.kpc-bank-chip input[type="radio"]:checked + .kpc-chip-card,
.kpc-bank-chip.is-selected .kpc-chip-card {
  border-color: #43593b;
  background: #fdfbf7;
  box-shadow: 0 4px 14px rgba(67, 89, 59, 0.12);
}

.kpc-chip-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

.kpc-chip-logo-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.kpc-chip-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.kpc-chip-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.kpc-chip-bank-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #121212;
  line-height: 1.2;
}

.kpc-chip-acc-num {
  font-size: 0.85rem;
  color: #43593b;
  font-weight: 600;
  margin-top: 2px;
}

.kpc-chip-acc-name {
  font-size: 0.78rem;
  color: #626262;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpc-chip-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.kpc-bank-chip input[type="radio"]:checked + .kpc-chip-card .kpc-chip-check,
.kpc-bank-chip.is-selected .kpc-chip-check {
  background: #43593b;
  border-color: #43593b;
}

/* Dropzone */
.kpc-file-dropzone {
  position: relative;
  border: 2px dashed #e8d7b9;
  border-radius: 16px;
  background: #ffffff;
  padding: 26px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.kpc-file-dropzone:hover,
.kpc-file-dropzone.dragover {
  border-color: #43593b;
  background: #fdfbf7;
}

.kpc-file-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.kpc-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #626262;
  pointer-events: none;
}

.kpc-dropzone-content svg {
  color: #43593b;
}

.kpc-dropzone-content strong {
  color: #43593b;
}

.kpc-dropzone-content small {
  color: #8c8c8c;
  font-size: 0.82rem;
}

.kpc-file-preview {
  margin-top: 14px;
  padding: 10px 16px;
  background: #fdfbf7;
  border-radius: 12px;
  border: 1px solid #e8d7b9;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #43593b;
  font-weight: 600;
}

.kpc-file-preview img {
  max-height: 64px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

/* Submit Button */
.kpc-form-submit {
  text-align: center;
  margin-top: 8px;
}

.kpc-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  background-color: #43593b;
  color: #ffffff;
  padding: 15px 32px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(67, 89, 59, 0.25);
}

.kpc-btn-submit:hover {
  background-color: #34472d;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(52, 71, 45, 0.35);
}

.kpc-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Notices */
.kpc-notice {
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 0.98rem;
  margin-bottom: 28px;
  line-height: 1.5;
}

.kpc-notice-success {
  background-color: #f0fff4;
  border-left: 4px solid #43593b;
  color: #22543d;
}

.kpc-notice-error {
  background-color: #fff5f5;
  border-left: 4px solid #e53e3e;
  color: #9b2c2c;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .kpc-form-wrapper {
    padding: 24px 18px;
    border-radius: 18px;
    margin: 20px auto;
  }

  .kpc-section {
    padding: 16px;
    border-radius: 14px;
  }

  .kpc-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .kpc-field-group.kpc-full-width {
    grid-column: span 1;
  }

  .kpc-bank-chips-grid {
    grid-template-columns: 1fr;
  }

  .kpc-btn-submit {
    max-width: 100%;
  }
}

/* ==========================================================================
   Auto-fill Prefilled Fields (from order-received page)
   ========================================================================== */
.kpc-prefilled {
  background: #f6faf4 !important;
  border-color: #a8c099 !important;
  color: #2d4a25 !important;
}

.kpc-prefilled:focus {
  border-color: #43593b !important;
  box-shadow: 0 0 0 3px rgba(67, 89, 59, 0.12) !important;
}

/* ==========================================================================
   Success State Card (Replaces form after successful submit)
   ========================================================================== */
.kpc-success-wrapper {
  text-align: center;
  padding: 40px 20px;
}

.kpc-success-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f0f7ed;
  color: #43593b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 24px rgba(67, 89, 59, 0.15);
}

.kpc-success-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #43593b;
  margin: 0 0 12px 0;
}

.kpc-success-message {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 8px 0;
}

.kpc-success-subtext {
  font-size: 0.95rem;
  color: #718096;
  margin: 0 0 32px 0;
}

.kpc-success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.kpc-btn-success-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.kpc-btn-success-action.primary {
  background: #43593b;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(67, 89, 59, 0.2);
}

.kpc-btn-success-action.primary:hover {
  background: #34472d;
  transform: translateY(-1px);
}

.kpc-btn-success-action.secondary {
  background: #f7faf7;
  color: #43593b !important;
  border: 1px solid #d0e0cc;
}

.kpc-btn-success-action.secondary:hover {
  background: #edf5eb;
  border-color: #43593b;
}
