/* The Lilliputs — floating contact widget (Makoons-style) */
.lilliputs-chat-widget {
  position: fixed;
  bottom: 14px;
  right: 16px;
  z-index: 99999;
  font-family: "Quicksand", sans-serif;
  text-align: right;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.lilliputs-chat-widget * {
  box-sizing: border-box;
}

.lilliputs-chat-widget .lcw-actions,
.lilliputs-chat-widget .lcw-toggle,
.lilliputs-chat-widget .lcw-panel {
  pointer-events: auto;
}

.lcw-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  position: relative;
  z-index: 2;
}

.lilliputs-chat-widget.is-open .lcw-actions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lilliputs-chat-widget:not(.is-open) .lcw-actions {
  position: absolute;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.lcw-action {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: lcwRiseIn 0.45s ease both;
}

.lcw-action:nth-child(1) { animation-delay: 0.05s; }
.lcw-action:nth-child(2) { animation-delay: 0.12s; }
.lcw-action:nth-child(3) { animation-delay: 0.19s; }

@keyframes lcwRiseIn {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(45deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

.lcw-label {
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}

.lcw-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lcw-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  color: #fff;
}

.lcw-btn-phone { background: #ec5923; }
.lcw-btn-callback { background: #0063ff; }
.lcw-btn-whatsapp { background: #25d366; }

.lcw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #9e267a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px 10px 14px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(158, 38, 122, 0.45);
  transition: background 0.25s ease, transform 0.2s ease;
  min-height: 52px;
  position: relative;
  z-index: 3;
}

.lcw-toggle:hover {
  background: #851f67;
  transform: scale(1.02);
}

.lcw-toggle-text {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.lcw-toggle-icon,
.lcw-toggle-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.lcw-toggle-close {
  display: none;
  font-size: 22px;
  line-height: 1;
}

.lilliputs-chat-widget.is-open .lcw-toggle-icon {
  display: none;
}

.lilliputs-chat-widget.is-open .lcw-toggle-close {
  display: inline-flex;
}

.lcw-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 100;
}

.lilliputs-chat-widget.is-open .lcw-panel.is-visible {
  bottom: 76px;
}

.lcw-panel.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lcw-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f8f4f7;
  border-bottom: 1px solid #eee;
}

.lcw-panel-header i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}

.lcw-panel-header i.lcw-icon-phone { background: #ec5923; }
.lcw-panel-header i.lcw-icon-callback { background: #0063ff; }

.lcw-panel-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.lcw-panel-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 4px;
}

.lcw-panel-body {
  padding: 18px 16px 20px;
}

.lcw-phone-number {
  display: block;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  padding: 24px 0;
}

.lcw-phone-number:hover {
  color: #9e267a;
}

.lcw-callback-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lcw-callback-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.lcw-callback-form input:focus {
  border-color: #9e267a;
}

.lcw-callback-form button[type="submit"] {
  background: #9e267a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.lcw-callback-form button[type="submit"]:hover {
  background: #851f67;
}

.lcw-callback-form button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.lcw-form-msg {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  min-height: 18px;
}

.lcw-form-msg.success { color: #198754; }
.lcw-form-msg.error { color: #dc3545; }

@media (max-width: 767px) {
  .lilliputs-chat-widget {
    bottom: 10px;
    right: 10px;
  }

  .lcw-toggle-text {
    display: none !important;
  }

  .lcw-toggle {
    width: 56px;
    height: 56px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    gap: 0;
  }

  .lcw-toggle-icon,
  .lcw-toggle-close {
    width: 56px;
    height: 56px;
    background: transparent;
    font-size: 24px;
  }

  .lcw-btn {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }

  .lilliputs-chat-widget.is-open .lcw-panel.is-visible {
    bottom: 70px;
  }
}
