/* ================================================================
   JimPlugin – Company Registration Form Styles
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

#jim-registration-wrap {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 680px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}

/* ---- Progress ---- */
.jim-progress {
  height: 5px;
  background: #e9ecef;
  position: relative;
}

.jim-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transition: width 0.5s cubic-bezier(.4, 0, .2, 1);
  border-radius: 0 4px 4px 0;
}

.jim-progress-steps {
  display: flex;
  justify-content: space-between;
  padding: 14px 32px 0;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.jim-step {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.jim-step.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

.jim-step.done {
  color: #10b981;
  border-bottom-color: #10b981;
}

/* ---- Form Step ---- */
.jim-form-step {
  padding: 36px 40px 40px;
  animation: jimFadeIn 0.35s ease;
}

@keyframes jimFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.jim-step-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
}

.jim-step-desc {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 28px;
}

/* ---- Fields ---- */
.jim-field-group {
  margin-bottom: 18px;
  flex: 1;
}

.jim-field-full {
  flex: 1 1 100% !important;
  width: 100%;
}

.jim-field-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.jim-req {
  color: #ef4444;
  margin-left: 2px;
}

.jim-field-group input,
.jim-field-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #1f2937;
  background: #f9fafb;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.jim-field-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
}

.jim-field-group input:focus,
.jim-field-group select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: #fff;
}

.jim-field-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.jim-field-row .jim-field-group {
  flex: 1;
  min-width: 140px;
}

.jim-section-label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 24px 0 16px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

/* ---- Order Summary ---- */
.jim-order-summary {
  background: #f5f3ff;
  border: 1.5px solid #e0d9ff;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 22px;
}

.jim-order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 4px 0;
}

.jim-order-total-row {
  border-top: 1px solid #e0d9ff;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 16px;
}

.jim-order-label {
  color: #6b7280;
}

.jim-order-value {
  color: #374151;
  font-weight: 500;
}

.jim-order-total-val {
  color: #4f46e5;
  font-weight: 700;
  font-size: 18px;
}

/* ---- Credit Card Preview ---- */
.jim-card-preview {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.35);
}

.jim-card-preview::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.jim-card-chip {
  width: 42px;
  height: 32px;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  border-radius: 6px;
  margin-bottom: 20px;
}

.jim-card-num {
  font-size: 20px;
  letter-spacing: 3px;
  font-weight: 600;
  margin-bottom: 20px;
  font-family: 'Courier New', monospace;
}

.jim-card-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Buttons ---- */
.jim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s;
  text-decoration: none;
}

.jim-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  width: 100%;
  margin-top: 10px;
}

.jim-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.jim-btn-primary:active {
  transform: translateY(0);
}

.jim-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.jim-btn-secondary:hover {
  background: #e5e7eb;
}

.jim-btn-pay {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.jim-btn-pay:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.jim-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.jim-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.jim-btn-row .jim-btn-primary {
  flex: 1;
  margin-top: 0;
}

.jim-btn-row .jim-btn-secondary {
  flex-shrink: 0;
}

/* ---- Products ---- */
#jim-products-list {
  display: grid;
  gap: 14px;
  margin-bottom: 4px;
}

.jim-product-card {
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafafa;
}

.jim-product-card:hover {
  border-color: #4f46e5;
  background: #f5f3ff;
}

.jim-product-card.selected {
  border-color: #4f46e5;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.jim-product-name {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 3px;
}

.jim-product-desc {
  font-size: 13px;
  color: #6b7280;
}

.jim-product-price {
  font-size: 20px;
  font-weight: 700;
  color: #4f46e5;
  white-space: nowrap;
}

.jim-product-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.jim-product-card.selected .jim-product-radio {
  border-color: #4f46e5;
  background: #4f46e5;
}

.jim-product-card.selected .jim-product-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

/* ---- Loading Spinner ---- */
.jim-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 30px 0;
  color: #6b7280;
  font-size: 15px;
}

.jim-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: jimSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes jimSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Error / Disclaimer ---- */
.jim-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 14px;
}

.jim-disclaimer {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 14px;
}

/* ---- Success ---- */
.jim-success {
  text-align: center;
  padding: 10px 0 20px;
  animation: jimFadeIn 0.5s ease;
}

.jim-success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.jim-success h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 10px;
}

.jim-success p {
  font-size: 15px;
  color: #6b7280;
  max-width: 400px;
  margin: 0 auto 20px;
}

.jim-success-details {
  background: #f0fdf4;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14px;
  color: #065f46;
  display: inline-block;
  text-align: left;
}

/* ---- Responsive ---- */
@media (max-width: 500px) {
  .jim-form-step {
    padding: 24px 20px 28px;
  }

  .jim-progress-steps {
    padding: 12px 16px 0;
  }

  .jim-field-row {
    flex-direction: column;
    gap: 0;
  }

  .jim-step-title {
    font-size: 20px;
  }

  .jim-card-num {
    font-size: 16px;
  }
}