#asta-feedback-overlay {
  position: fixed;
  bottom: 9px;
  left: 9px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

#asta-feedback-overlay *,
#asta-feedback-overlay *::before,
#asta-feedback-overlay *::after {
  box-sizing: border-box;
}

/* --- Card (form) --- */
.asta-feedback-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  width: 340px;
  padding: 20px;
  position: absolute;
  bottom: 0;
  left: 0;
  transform: translateY(0);
  opacity: 1;
  transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .4s ease, visibility .4s;
  visibility: visible;
}

.asta-feedback-card.is-hidden {
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.asta-feedback-card textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color .2s;
}

.asta-feedback-card textarea:focus {
  outline: none;
  border-color: #666;
  box-shadow: 0 0 0 3px rgba(102,102,102,.15);
}

.asta-feedback-card .asta-feedback-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.asta-feedback-card .asta-feedback-btn:hover {
  background: #555;
}

.asta-feedback-card .asta-feedback-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.asta-feedback-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}

.asta-feedback-close:hover {
  background: #f0f0f0;
  color: #333;
}

.asta-feedback-card .asta-feedback-message {
  margin-top: 8px;
  font-size: 13px;
  color: #28a745;
  text-align: center;
}

.asta-feedback-card .asta-feedback-error {
  color: #c0392b;
}

/* --- Icon button (collapsed) --- */
.asta-feedback-icon {
  width: 48px;
  height: 48px;
  /* The overlay container has only absolutely-positioned children, so it is
     0x0; a theme-wide `button { max-width: 100% }` would shrink the icon to
     nothing. The icon is a fixed circle. */
  max-width: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  opacity: 0.78;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 10px 26px rgba(18,31,42,0.16), 0 0 0 4px rgba(0,120,180,0.16);
  transition: opacity .3s ease, visibility .3s, transform .3s cubic-bezier(.4,0,.2,1);
  position: absolute;
  bottom: 0;
  left: 0;
}

.asta-feedback-icon:hover {
  opacity: 1;
}

.asta-feedback-icon.is-hidden {
  transform: scale(0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.asta-feedback-icon img {
  display: block;
  opacity: 0.7;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .asta-feedback-card {
    width: calc(100vw - 18px);
    left: 0;
  }

  #asta-feedback-overlay {
    bottom: 9px;
    left: 9px;
  }
}

/* One-time prompt: the opt-out sits below the submit button, quieter than the
   action itself so it is available without inviting a reflexive click. */
.asta-feedback-card .asta-feedback-optout {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 4px;
  background: none;
  border: 0;
  color: #5b5b66;
  font-size: 12px;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
}

.asta-feedback-card .asta-feedback-optout:hover,
.asta-feedback-card .asta-feedback-optout:focus {
  color: #333;
}
