/* Feedback Widget Styles - scoped under .fbw- prefix to avoid host page conflicts */

.fbw-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2147483000;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 12px 20px;
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fbw-launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}
.fbw-launcher:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.fbw-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 2147483100;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  animation: fbw-fade-in 0.18s ease;
}
@keyframes fbw-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fbw-panel {
  background: #fff;
  width: 380px;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111827;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fbw-slide-up 0.2s ease;
}
@keyframes fbw-slide-up {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.fbw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
}
.fbw-title {
  font-weight: 700;
  font-size: 15px;
  margin: 0;
}
.fbw-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
}
.fbw-close:hover { background: #f3f4f6; color: #111827; }

.fbw-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fbw-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fbw-type-btn {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.12s;
}
.fbw-type-btn:hover { background: #f3f4f6; }
.fbw-type-btn[aria-pressed="true"] {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.fbw-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.fbw-input,
.fbw-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  color: #111827;
  background: #fff;
  resize: vertical;
}
.fbw-input:focus,
.fbw-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.fbw-textarea { min-height: 96px; }

.fbw-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fbw-secondary-btn {
  flex: 1;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.fbw-secondary-btn:hover { background: #f9fafb; }
.fbw-secondary-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.fbw-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fbw-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: #374151;
}
.fbw-attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
.fbw-attachment-remove {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.fbw-attachment-remove:hover { color: #ef4444; }

.fbw-captcha-wrap {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.fbw-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.fbw-submit {
  width: 100%;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.fbw-submit:hover { background: #1d4ed8; }
.fbw-submit:disabled { background: #93c5fd; cursor: not-allowed; }

.fbw-message {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
}
.fbw-message.fbw-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.fbw-message.fbw-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.fbw-success-panel {
  text-align: center;
  padding: 32px 20px;
}
.fbw-success-panel h3 {
  margin: 12px 0 6px;
  font-size: 16px;
}
.fbw-success-panel p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

@media (max-width: 480px) {
  .fbw-backdrop { padding: 0; }
  .fbw-panel { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}
