/**
 * Moon Safety Nets & Invisible Grills
 * Quote Form V2 Styles — Upload Zone, Previews, Success State
 */

/* ─── Upload Zone ────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--color-neutral-300, #d1d5db);
  border-radius: var(--radius-lg, 12px);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  background: var(--color-neutral-50, #fafafa);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--color-primary, #FF6500);
  background: rgba(255, 101, 0, 0.04);
}

.upload-zone.drag-over {
  border-style: solid;
  background: rgba(255, 101, 0, 0.08);
}

.upload-zone-content p {
  line-height: 1.4;
}

/* ─── Upload Previews ────────────────────────────────────────────── */
.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.upload-preview-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-neutral-50, #f5f5f5);
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: 6px 10px 6px 6px;
  font-size: 0.82rem;
  animation: fadeIn 0.3s ease;
}

.preview-img-wrap {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.preview-name {
  font-weight: 600;
  color: var(--color-neutral-700, #333);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.preview-size {
  color: var(--color-neutral-500, #888);
  font-size: 0.75rem;
}

.preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #e53e3e;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.15s ease;
  padding: 0;
}

.preview-remove:hover {
  transform: scale(1.15);
  background: #c53030;
}

/* ─── Form Feedback ──────────────────────────────────────────────── */
.form-feedback {
  display: none;
  margin-top: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.form-feedback.visible {
  display: block !important;
}

.form-feedback:empty {
  margin: 0;
  display: none !important;
}

.form-feedback .form-error {
  color: #e53e3e;
  background: #fff5f5;
  border: 1px solid #feb2b2;
  padding: 12px 16px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.9rem;
  animation: shake 0.4s ease;
}

.form-feedback .form-loading {
  color: var(--color-primary, #FF6500);
  background: #fff8f0;
  border: 1px solid rgba(255, 101, 0, 0.2);
  padding: 12px 16px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Spinner ────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 101, 0, 0.3);
  border-top-color: var(--color-primary, #FF6500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ─── Success State ──────────────────────────────────────────────── */
.form-success-state {
  text-align: center;
  padding: 32px 16px;
  animation: fadeScaleIn 0.5s ease;
}

.success-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f0fff4;
  border: 2px solid #c6f6d5;
  animation: pulseSuccess 1.5s ease infinite;
}

.success-details {
  display: inline-block;
  text-align: left;
  background: var(--color-neutral-50, #f8f9fa);
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
  max-width: 400px;
  width: 100%;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-neutral-100, #f0f0f0);
}

.success-detail-row:last-child {
  border-bottom: none;
}

.success-detail-row span {
  color: var(--color-neutral-500, #888);
}

.success-detail-row strong {
  color: var(--color-neutral-800, #222);
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes pulseSuccess {
  0%, 100% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.2); }
  50% { box-shadow: 0 0 0 12px rgba(72, 187, 120, 0); }
}

/* ─── Ultra-Professional WhatsApp Actions ───────────────────────── */
.btn-ultra-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #25D366;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ultra-whatsapp:hover {
  background: #20BD5A;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.55);
  color: #ffffff !important;
}

.btn-whatsapp-direct {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #ffffff !important;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-direct:hover {
  background: #20BD5A;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

@keyframes pulseGreen {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
}

.pulse-green {
  animation: pulseGreen 2s infinite ease-in-out;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .upload-previews {
    flex-direction: column;
  }
  .success-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .success-actions .btn {
    justify-content: center;
  }
  .btn-whatsapp-direct {
    width: 100%;
    justify-content: center;
  }
}

