/* styles.css */
:root{
  --popup-width: 440px;
  --accent: #2563eb;
  --bg: #ffffff;
  --overlay: rgba(0,0,0,0.35);
  --radius: 10px;
  --shadow: 0 8px 28px rgba(15,23,42,0.18);
  --muted: #6b7280;
}

body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }

.feedback-overlay{
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.feedback-popup{
  width: var(--popup-width);
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* header row */
.fp-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fp-title{
  font-size: 18px;
  font-weight: 600;
  top: 2px;
  color: #0f172a;
}

.fp-close{
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: red;
  padding: 6px;
  border-radius: 6px;
}
.fp-close:hover{ background: rgba(0,0,0,0.04); }

.fp-row{ display: flex; flex-direction: column; gap: 6px; }

/* input styles */
.fp-input, .fp-textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #0015ff;
  font-size: 14px;
  box-sizing: border-box;
}

.fp-input::placeholder{ color: #0015ff; }
.fp-textarea {
  min-height: 110px;
  resize: vertical;
  max-height: 400px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: #0015ff;
  line-height: 1.5;
}

/* stars */
.star-row{
  display: flex;
  gap: 6px;
  align-items: center;
}
.star{
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  font-size: 18px;
  color: #0015ff;
}
.star.active{
  color: #f59e0b; /* amber for active */
  background: rgba(245,158,11,0.08);
}

/* submit button */
.fp-submit{
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: #0015ff;;
  color: white;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-size: 15px;
}
.fp-submit:disabled{
  background: #0015ff;
  cursor: not-allowed;
}

/* small helpers */
.char-counter{
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.fp-note{
  font-size: 12px;
  color: black;
}

/* show overlay */
.feedback-overlay.show{ display: flex; }

/* responsive */
@media (max-width: 520px){
  .feedback-popup { width: calc(100% - 32px); }
  .star { width: 26px; height: 26px; font-size: 16px; }
}


.fp-error {
  color: #d32f2f;
  font-size: 14px;
  margin-top: 8px;
  margin-bottom: 8px;
  text-align: center;
  display: none;
}

/* Feedback overlay with blur */
.feedback-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px); /* apply blur */
  -webkit-backdrop-filter: blur(5px); /* Safari support */
  background: rgba(0, 0, 0, 0.35); /* semi-transparent overlay color */
}

.feedback-overlay.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* Animate the popup sliding from bottom to top */
.feedback-popup {
  transform: translateY(50px); /* start slightly below */
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* When overlay is shown, animate the popup */
.feedback-overlay.show .feedback-popup {
  transform: translateY(0);
  opacity: 1;
  animation: slideUpFadeIn 0.5s forwards;
}

/* Keyframes for smooth slide-up + fade-in */
@keyframes slideUpFadeIn {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


