/* ============================================================
   SUN LIGHT ASSURE — Form Additions CSS
   Add this to main.css OR link as a separate file AFTER main.css
   ============================================================ */

/* ---- Upload Preview Card ---- */
.sla-preview-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 10px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(11,45,92,.07);
  transition: border-color .3s ease;
}

.sla-preview-card:hover {
  border-color: rgba(242,154,46,.45);
}

/* Thumbnail */
.sla-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sla-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sla-thumb-pdf {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.sla-thumb-pdf i {
  font-size: 1.6rem;
  color: #dc2626;
}

/* Info */
.sla-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sla-prev-name {
  font-size: .82rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sla-prev-size {
  font-size: .74rem;
  color: #94a3b8;
}

/* Action buttons */
.sla-preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sla-prev-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  cursor: pointer;
  transition: all .25s ease;
  background: transparent;
}

.sla-view-btn {
  border-color: #cbd5e1;
  color: #475569;
}

.sla-view-btn:hover {
  background: #0B2D5C;
  border-color: #0B2D5C;
  color: #fff;
  transform: translateY(-2px);
}

.sla-remove-btn {
  border-color: #fca5a5;
  color: #dc2626;
}

.sla-remove-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  transform: translateY(-2px);
}

/* ---- Upload preview wrapper (make sure it's visible) ---- */
#prev-aadhaar,
#prev-pan,
#prev-passbook,
#prev-housetax,
#prev-ebill {
  display: none;   /* shown via JS when file chosen */
  width: 100%;
}

/* ---- Spinner inside submit button ---- */
.sla-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: slaSpin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes slaSpin {
  to { transform: rotate(360deg); }
}

/* ---- SweetAlert2 custom overrides ---- */
.sla-swal-popup {
  border-radius: 18px !important;
  font-family: 'DM Sans', sans-serif !important;
  padding: 32px 28px !important;
}

.sla-swal-title {
  font-family: 'Playfair Display', serif !important;
  color: #0B2D5C !important;
  font-size: 1.4rem !important;
}

.sla-swal-confirm {
  border-radius: 10px !important;
  padding: 10px 28px !important;
  font-weight: 600 !important;
  font-size: .92rem !important;
  font-family: 'DM Sans', sans-serif !important;
}

/* Image lightbox popup */
.sla-swal-img-popup {
  border-radius: 18px !important;
  max-width: 90vw !important;
}

.sla-swal-img-popup .swal2-image {
  border-radius: 10px;
  max-height: 75vh;
  object-fit: contain;
}

/* ---- is-valid / is-invalid for selects ---- */
.custom-select-input.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220,38,38,.07) !important;
}

.custom-select-input.is-valid {
  border-color: #16a34a !important;
}