/* ===== WIDGET TRIGGER BUTTON ===== */
#callback-trigger {
  position: fixed;
  bottom: calc(12% + 64px);
  right: calc(6% - 32px);
  width: 64px;
  height: 128px;
  border-radius: 20px;
  border: 2px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#callback-trigger:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

#callback-trigger:active {
  transform: scale(0.97);
}

/* Liquid/Mesh Gradient Animation */
#callback-trigger::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: linear-gradient(45deg,#F17C58, #E94584, #24AADB , #27DBB1,#FFDC18, #FF3706);
  background-size: 250% 250%;
  animation: liquidGradient 8s linear infinite;
  z-index: 0;
}

@keyframes liquidGradient {
  0%   { background-position: 0% 50%;   transform: rotate(0deg) scale(1.2); }
  25%  { background-position: 100% 0%;  transform: rotate(90deg) scale(1.4); }
  50%  { background-position: 100% 100%; transform: rotate(180deg) scale(1.2); }
  75%  { background-position: 0% 100%;  transform: rotate(270deg) scale(1.4); }
  100% { background-position: 0% 50%;   transform: rotate(360deg) scale(1.2); }
}

#callback-trigger .trigger-icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}

/* ===== OVERLAY ===== */
#callback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#callback-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ===== POP-UP MODAL ===== */
#callback-modal {
  position: fixed;
  bottom: 90px;
  right: 80px;
  width: 340px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

#callback-modal.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Close button */
#callback-modal .modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #9ca3af;
  transition: background 0.15s, color 0.15s;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

#callback-modal .modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Headline */
#callback-modal .modal-headline {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #111827;
  margin: 0 0 20px;
}

/* Input */
#callback-modal .modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  color: #111827;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  letter-spacing: 0.5px;
}

#callback-modal .modal-input:focus {
  border-color: #a855f7;
}

#callback-modal .modal-input.error {
  border-color: #ef4444;
  animation: shake 0.3s ease;
}

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

/* Submit Button */
#callback-modal .modal-submit {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.2px;
  transition: opacity 0.2s, transform 0.15s;
}

#callback-modal .modal-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

#callback-modal .modal-submit:active {
  transform: translateY(0);
}

#callback-modal .modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success State */
#callback-modal .modal-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
  gap: 12px;
}

#callback-modal .modal-success.visible {
  display: flex;
}

#callback-modal .modal-success-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#callback-modal .modal-success-icon svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#callback-modal .modal-success-text {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

#callback-modal .modal-success-sub {
  font-size: 14px;
  color: #6b7280;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  #callback-trigger {
    bottom: 200px;
    right: 10px;
  }

  #callback-modal {
    left: 12px;
    right: 12px;
    bottom: 20px;
    width: auto;
  }
}
