/* ============================================================
   Tutsy ID — Floating WhatsApp Widget (CSS)
   Gaya: mengikuti widget NW28 (header gradasi, form 3 kolom)
   Warna brand: PINK #E75480 (Tutsy)
   File  : assets/css/tutsy-widget.css
   Dipakai oleh : assets/js/tutsy-widget.js
   Semua selector diawali #tutsy-widget / .tutsy- agar TIDAK
   bentrok dengan nicepage.css / tema website.
   ============================================================ */

#tutsy-widget {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#tutsy-widget *,
#tutsy-widget *::before,
#tutsy-widget *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Tombol FAB (bulat, pink) ---------- */
.tutsy-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background-color: var(--tutsy-brand, #E75480);
  border: none;
  border-radius: 50px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(231, 84, 128, 0.45);
  z-index: var(--tutsy-z, 9990);
  cursor: pointer;
  animation: tutsy-pulse 2s infinite;
  outline: none;
}
.tutsy-fab svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
  display: block;
}
.tutsy-fab:hover,
.tutsy-fab:focus-visible {
  background-color: #d14a73;
}
@keyframes tutsy-pulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(231, 84, 128, 0.7); }
  70%  { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(231, 84, 128, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(231, 84, 128, 0); }
}

/* ---------- Popup card ---------- */
.tutsy-popup {
  display: none;
  position: fixed;
  bottom: 110px;
  right: 30px;
  width: 360px;
  max-width: calc(100vw - 24px);
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  border: 1px solid #eaeaea;
  z-index: var(--tutsy-z, 9990);
  overflow: hidden;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#tutsy-widget.open .tutsy-popup {
  display: block;
  animation: tutsy-pop-in 0.25s ease;
}
@keyframes tutsy-pop-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Header popup (gradasi pink) ---------- */
.tutsy-header {
  background: linear-gradient(135deg, var(--tutsy-brand, #E75480), #c23a66);
  color: #ffffff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tutsy-header-text {
  display: flex;
  flex-direction: column;
}
.tutsy-title {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.tutsy-subtitle {
  font-size: 12px;
  opacity: 0.92;
  font-weight: 300;
}
.tutsy-close {
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  background: none;
  border: none;
  color: #ffffff;
  padding: 0 2px;
}
.tutsy-close:hover {
  opacity: 1;
}

/* ---------- Body form ---------- */
.tutsy-body {
  padding: 20px;
  background-color: #fafafa;
}
.tutsy-field {
  margin-bottom: 15px;
}
.tutsy-field label {
  display: block;
  font-size: 13px;
  color: #555555;
  margin-bottom: 8px;
  font-weight: 600;
}
.tutsy-field input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  font-family: inherit;
  background-color: #ffffff !important;
  color: #111111 !important;
  transition: all 0.3s ease;
}
.tutsy-field input::placeholder {
  color: #9ca3af;
}
.tutsy-field input:focus {
  outline: none;
  border-color: var(--tutsy-brand, #E75480);
  box-shadow: 0 0 5px rgba(231, 84, 128, 0.35);
}

/* Pesan error */
.tutsy-error {
  min-height: 18px;
  font-size: 12.5px;
  color: #dc2626;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Tombol Chat Sekarang */
.tutsy-submit {
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  background-color: var(--tutsy-brand, #E75480);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(231, 84, 128, 0.35);
  transition: all 0.3s ease;
}
.tutsy-submit:hover {
  background-color: #d14a73;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(231, 84, 128, 0.45);
}
.tutsy-submit:disabled {
  opacity: 0.7;
  transform: none;
  cursor: default;
}

/* Status terima kasih */
.tutsy-status {
  display: none;
  text-align: center;
  color: #16a34a;
  font-size: 14px;
  font-weight: 600;
  padding: 28px 16px 32px;
}
.tutsy-status:not([hidden]) {
  display: block;
}
.tutsy-form[hidden],
.tutsy-status[hidden] {
  display: none !important;
}

/* ---------- Responsif ---------- */
@media (max-width: 480px) {
  .tutsy-fab {
    bottom: 16px;
    right: 16px;
    width: 58px;
    height: 58px;
  }
  .tutsy-popup {
    bottom: 88px;
    right: 12px;
    width: min(360px, calc(100vw - 24px));
  }
  .tutsy-field input {
    font-size: 16px; /* cegah auto-zoom saat fokus di iOS */
  }
}

@media (prefers-reduced-motion: reduce) {
  .tutsy-fab,
  #tutsy-widget.open .tutsy-popup {
    animation: none;
  }
}
