/* widget reason update */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 16px;
}

#widget-container {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Floating Toggle Button */
#widget-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

#widget-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary-hover);
}

/* The Form Card */
.widget-card {
  position: fixed;
  bottom: 105px;
  right: 30px;
  width: 340px;
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Visibility States */
.hidden {
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  pointer-events: none;
}

#widget-container h3 {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  color: var(--text-main);
  font-weight: 700;
}

.field-group {
  margin-bottom: 18px;
}

#widget-container label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

#widget-container input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #f1f5f9;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  color: var(--text-main);
  box-sizing: border-box;
  transition: all 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-submit {
  flex: 2;
  background: var(--primary);
  color: white;
}

.btn-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-submit:disabled {
  background: #a5a6f6;
  cursor: not-allowed;
}

.btn-clear {
  flex: 1;
  background: #f1f5f9;
  color: var(--text-muted);
}

.btn-clear:hover {
  background: #e2e8f0;
}

/* Loading Overlay Style */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  border-radius: var(--radius);
  z-index: 10;
  font-weight: 600;
  color: var(--primary);
}

/* widget reason update */
