/* ═══════════════════════════════════════════════════════════
   Feedback FAB — Shaka rating + feedback modal
   Mirrors the My Trip FAB (left side) on the right side
   ═══════════════════════════════════════════════════════════ */

/* ── FAB Button ─────────────────────────────────────────── */
.hg-fb-fab {
  display: flex;
  position: fixed;
  bottom: 160px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5c842 0%, #e8b730 100%);
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 9991;
  align-items: center;
  justify-content: center;
  animation: hg-fb-pulse 2.5s infinite;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.hg-fb-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.hg-fb-fab.is-open {
  animation: none;
  background: linear-gradient(135deg, #444 0%, #333 100%);
}

.hg-fb-fab .hg-fb-fab-icon {
  transition: transform 0.25s ease, opacity 0.25s ease;
  font-size: 22px;
}
.hg-fb-fab .hg-fb-fab-close {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -11px;
  margin-left: -7px;
  opacity: 0;
  transform: rotate(-90deg) scale(0);
  transition: transform 0.25s ease, opacity 0.25s ease;
  font-size: 22px;
  font-style: normal;
}
.hg-fb-fab.is-open .hg-fb-fab-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}
.hg-fb-fab.is-open .hg-fb-fab-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

@keyframes hg-fb-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 0 rgba(245,200,66,0.4); }
  50% { box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 0 0 10px rgba(245,200,66,0); }
}

/* ── One-time tooltip ───────────────────────────────────── */
.hg-fb-tooltip {
  position: fixed;
  bottom: 170px;
  right: 78px;
  z-index: 9991;
  background: #333;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.hg-fb-tooltip.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.hg-fb-tooltip .fa-shaka {
  color: #f5c842;
  margin-left: 2px;
}
/* Arrow pointing right toward the FAB */
.hg-fb-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  margin-top: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent #333;
}

/* ── Rating Panel ───────────────────────────────────────── */
.hg-fb-panel {
  position: fixed;
  bottom: 220px;
  right: 16px;
  z-index: 9991;
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.22);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  min-width: 200px;
  text-align: center;
}
.hg-fb-panel.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hg-fb-panel-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

/* ── Shaka row ──────────────────────────────────────────── */
.hg-fb-shakas {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0 0 10px 0;
}
.hg-fb-shaka {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0f0f0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, color 0.15s;
  color: #bbb;
  font-size: 20px;
  border: none;
  padding: 0;
}
.hg-fb-shaka:hover,
.hg-fb-shaka.is-hover {
  background: #fff8e1;
  color: #f5c842;
  transform: scale(1.15);
}
.hg-fb-shaka.is-active {
  background: #fff8e1;
  color: #f5c842;
}
.hg-fb-shaka.is-rated {
  animation: shakaWave 0.6s ease-in-out;
}

/* ── Report link ────────────────────────────────────────── */
.hg-fb-report-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-decoration: underline;
  transition: color 0.15s;
}
.hg-fb-report-link:hover {
  color: #666;
}

/* ── Aggregate line ─────────────────────────────────────── */
.hg-fb-aggregate {
  font-size: 11px;
  color: #aaa;
  margin-top: 6px;
}

/* ── Mahalo confirmation ────────────────────────────────── */
.hg-fb-mahalo {
  text-align: center;
  padding: 8px 0;
}
.hg-fb-mahalo-text {
  font-size: 17px;
  font-weight: 700;
  color: #333;
  margin: 0 0 4px 0;
}
.hg-fb-mahalo-sub {
  font-size: 12px;
  color: #999;
  margin: 0;
}
.hg-fb-mahalo .fa-shaka {
  color: #f5c842;
  font-size: 28px;
  display: block;
  margin: 0 auto 6px auto;
  animation: shakaWave 0.6s ease-in-out;
}

/* ── Feedback Modal ─────────────────────────────────────── */
.hg-fb-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 15px;
}
.hg-fb-modal.is-active { display: flex; }

.hg-fb-modal-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
}
.hg-fb-modal-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 1;
  animation: hgFbModalIn 0.25s ease-out;
}
@keyframes hgFbModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.hg-fb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e8e8e8;
}
.hg-fb-modal-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}
.hg-fb-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.hg-fb-modal-close:hover { color: #333; }

.hg-fb-modal-body {
  padding: 18px;
}
.hg-fb-modal-page {
  font-size: 12px;
  color: #999;
  margin: 0 0 14px 0;
  word-break: break-all;
}

.hg-fb-textarea {
  width: 100%;
  min-height: 100px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.hg-fb-textarea:focus {
  outline: none;
  border-color: #f5c842;
}
.hg-fb-char-count {
  text-align: right;
  font-size: 11px;
  color: #bbb;
  margin-top: 4px;
}

.hg-fb-email-input {
  width: 100%;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  margin-top: 12px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.hg-fb-email-input:focus {
  outline: none;
  border-color: #f5c842;
}
.hg-fb-email-label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 12px;
  margin-bottom: 4px;
}

/* ── Pono message ───────────────────────────────────────── */
.hg-fb-pono {
  background: #fefce8;
  border-left: 3px solid #f5c842;
  padding: 10px 12px;
  margin: 16px 0 0 0;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}
.hg-fb-pono .fa-shaka {
  color: #f5c842;
  margin-right: 4px;
}

/* ── Submit button ──────────────────────────────────────── */
.hg-fb-modal-footer {
  padding: 0 18px 18px 18px;
}
.hg-fb-submit {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #f5c842 0%, #e8b730 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hg-fb-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,200,66,0.4);
}
.hg-fb-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Modal success state ────────────────────────────────── */
.hg-fb-modal-success {
  text-align: center;
  padding: 30px 18px;
}
.hg-fb-modal-success .fa-shaka {
  color: #f5c842;
  font-size: 36px;
  display: block;
  margin: 0 auto 10px auto;
  animation: shakaWave 0.6s ease-in-out;
}
.hg-fb-modal-success h4 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0 0 6px 0;
}
.hg-fb-modal-success p {
  font-size: 14px;
  color: #999;
  margin: 0;
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .hg-fb-fab,
  .hg-fb-panel,
  .hg-fb-modal { display: none !important; }
}

/* ── Mobile adjustments ─────────────────────────────────── */
@media (max-width: 480px) {
  .hg-fb-panel {
    right: 10px;
    left: 10px;
    min-width: auto;
  }
  .hg-fb-fab {
    bottom: 100px;
    right: 12px;
    width: 46px;
    height: 46px;
    font-size: 18px;
  }
  .hg-fb-fab .hg-fb-fab-icon { font-size: 19px; }
  .hg-fb-panel {
    bottom: 155px;
  }
  .hg-fb-shaka {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .hg-fb-tooltip {
    bottom: 110px;
    right: 68px;
  }
}
