:root {
  --widget-width: 360px;
  --widget-bg: #ffffff;
  --accent: #3D1FAF;
  --muted: #6b7280;
  --shadow-1: 0 6px 18px rgba(72, 38, 104, 0.12);
  --shadow-2: 0 12px 30px rgba(72, 38, 104, 0.08);
}

:host {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.sw-fab {
  position: fixed;
  z-index: 99999999999;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #57DFFF);
  box-shadow: var(--shadow-1), var(--shadow-2);
  cursor: pointer;
  border: none;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 150ms ease;
}

.sw-fab:active { transform: scale(.96); }
.sw-fab.small { width: 52px; height: 52px; }

.sw-popup {
  position: fixed;
  width: var(--widget-width);
  max-width: calc(100% - 32px);
  bottom: 120px;
  right: 20px;
  z-index: 999998;
  border-radius: 12px;
  background: var(--widget-bg);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 6px 18px rgba(72, 38, 104, 0.06);
  transform-origin: bottom right;
  transform: translateY(12px) scale(.98);
  opacity: 0;
  transition: transform 240ms cubic-bezier(.2,.9,.3,1), opacity 180ms ease;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.sw-popup.show { transform: translateY(0) scale(1); opacity: 1; display: flex;}
.sw-popup.left { right: auto; left: 20px; transform-origin: bottom left; }

.sw-header {
  padding: 14px 16px;
  background: linear-gradient(90deg, #4b2f9a, #57DFFF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sw-header h4 { margin: 0; font-size: 16px; font-weight: 600; }
.sw-close { background: transparent; border: 0; color: rgba(255,255,255,0.95); cursor: pointer; font-size: 18px; }

.sw-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
}

.sw-actions {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(15,23,42,0.04);
  background: linear-gradient(180deg, rgba(255,255,255,0.00), rgba(255,255,255,0.02));
}

.sw-btn {
  flex: 1;
  padding: 10px 7px;
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,0.06);
  background: #fff;
  color: #0b2540;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.sw-btn.primary { background: linear-gradient(90deg,var(--accent), #57DFFF); color: #fff; border: 0; }
.sw-btn:hover { transform: translateY(-2px); }

/* Enhanced WhatsApp Button */
.sw-btn-wa {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  border: 0;
  font-weight: 600;
  /* box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3), 0 2px 6px rgba(37, 211, 102, 0.2); */
  position: relative;
  overflow: hidden;
}

.sw-btn-wa::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.sw-btn-wa:hover::before {
  left: 100%;
}

.sw-btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4), 0 4px 10px rgba(37, 211, 102, 0.3);
  background: linear-gradient(135deg, #2EE576 0%, #1BA085 100%);
}

.sw-btn-wa:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.sw-btn-wa svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform 200ms ease;
}

.sw-btn-wa:hover svg {
  transform: scale(1.1);
}

.sw-btn-wa span {
  position: relative;
  z-index: 1;
}

.sw-form { display: none; flex-direction: column; gap: 8px; }
.sw-form.show { display: flex; }
.sw-wa-card { display: none; }
.sw-wa-card.show { display: flex; }
.sw-field { display:flex; flex-direction:column; gap:6px; }
.sw-field input, .sw-field textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,0.06);
  font-size: 12px;
  outline: none;
  resize: vertical;
  /* min-height: 42px; */
}
.sw-message { min-height: 96px; }
.sw-note { font-size: 12px; color: var(--muted); }
.sw-submit { align-self: flex-end; padding: 8px 12px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }

/* WhatsApp Enquiry Card */
.sw-wa-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  margin-top: 8px;
}

.sw-wa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.sw-wa-card:active {
  transform: translateY(0);
}

.sw-wa-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgb(255, 255, 255);
  border-radius: 50%;
  flex-shrink: 0;
}

.sw-wa-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sw-wa-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.sw-wa-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
}

.sw-wa-arrow {
  font-size: 18px;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
  transition: transform 150ms ease;
}

.sw-wa-card:hover .sw-wa-arrow {
  transform: translateX(4px);
}

.sw-success {
  padding: 12px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid rgba(6,95,70,0.08);
}

/* File upload area */
.sw-file-upload {
  position: relative;
  border: 2px dashed rgba(15,23,42,0.12);
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}
.sw-file-upload:hover,
.sw-file-upload.dragover {
  border-color: var(--accent);
  background: rgba(61,31,175,0.04);
}
.sw-file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.sw-file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}
.sw-file-hint {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.7;
  margin-top: 2px;
}

/* File list */
.sw-file-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.sw-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(15,23,42,0.03);
  font-size: 11px;
  color: #374151;
}
.sw-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw-file-name small {
  color: var(--muted);
}
.sw-file-remove {
  background: transparent;
  border: 0;
  color: #d23;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
}
.sw-file-remove:hover {
  color: #a00;
}

.d-flex {
  display: flex;
}

.gap-2 {
  gap: 5px;
}

.align-items-center {
  align-items: center;
}


@media (max-width: 480px) {
  .sw-popup { left: 12px; right: 12px; width: auto; bottom: 88px; border-radius: 10px; }
  .sw-fab { right: 16px; bottom: 16px; }
}


