/* ==========================================================================
   HarclikGo Hata Bildirimi (Bug Report) Styling
   Glassmorphism, rich animations, responsive modal & floating button
   ========================================================================== */

/* Top Navigation Bar Button */
.lp-nav-bug {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 1.05rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: rgba(220, 38, 38, 0.85);
  border: 1.5px solid rgba(254, 202, 202, 0.45);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.lp-nav-bug:hover {
  background: #dc2626;
  border-color: #fecaca;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
  color: #fff;
}

.lp-nav-bug svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lp-nav-bug:hover svg {
  transform: rotate(15deg) scale(1.1);
}

/* Floating Action Button (FAB) */
.lp-fab-bug {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 995;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem 0.75rem 1rem;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #f9fafb;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.lp-fab-bug:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.45), 0 6px 10px -3px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fff;
}

.lp-fab-bug-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 50%;
  animation: bugFabPulse 2s infinite ease-out;
}

@keyframes bugFabPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.lp-fab-bug-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.lp-fab-bug:hover .lp-fab-bug-icon {
  transform: scale(1.12);
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.lp-fab-bug-text {
  letter-spacing: -0.01em;
}

/* Modal Backdrop */
.bug-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 25, 18, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.bug-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Modal Card */
.bug-modal-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: 2rem;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bug-modal-backdrop.is-open .bug-modal-card {
  transform: scale(1) translateY(0);
}

/* Close Button */
.bug-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.bug-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

/* Modal Header */
.bug-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.bug-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.bug-modal-header h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.bug-modal-header p {
  margin: 0;
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.45;
}

/* Alert Notification */
.bug-alert {
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.4;
}

.bug-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.bug-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* Grid & Fields */
.bug-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .bug-grid-2 {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.bug-field {
  margin-bottom: 1.15rem;
}

.bug-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.bug-req {
  color: #dc2626;
  font-weight: 800;
}

.bug-opt {
  color: #9ca3af;
  font-weight: 400;
  font-size: 0.78rem;
}

.bug-field input[type="text"],
.bug-field select,
.bug-field textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1f2937;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.bug-field input[type="text"]::placeholder,
.bug-field textarea::placeholder {
  color: #9ca3af;
}

.bug-field input[type="text"]:focus,
.bug-field select:focus,
.bug-field textarea:focus {
  background: #ffffff;
  border-color: #0d9f6e;
  box-shadow: 0 0 0 3px rgba(13, 159, 110, 0.15);
}

.bug-field select {
  cursor: pointer;
  appearance: auto;
}

.bug-field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

/* File Dropzone */
.bug-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.1rem;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  transition: all 0.22s ease;
}

.bug-dropzone:hover,
.bug-dropzone.is-dragover {
  border-color: #0d9f6e;
  background: #f0fdf4;
}

#bugDropDefault {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: #64748b;
}

#bugDropDefault svg {
  color: #94a3b8;
  margin-bottom: 0.2rem;
  transition: transform 0.2s ease;
}

.bug-dropzone:hover #bugDropDefault svg {
  transform: translateY(-2px);
  color: #0d9f6e;
}

#bugDropDefault span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

#bugDropDefault small {
  font-size: 0.74rem;
  color: #94a3b8;
}

#bugFilePreview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.bug-preview-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  max-width: 100%;
}

#bugPreviewName {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bug-remove-file {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #ef4444;
  cursor: pointer;
  padding: 0 0.2rem;
}

.bug-remove-file:hover {
  color: #b91c1c;
}

#bugPreviewImg {
  max-width: 100%;
  max-height: 140px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

/* Detected Meta Pill */
.bug-auto-meta {
  margin: 0.75rem 0 1.25rem;
}

.bug-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

/* Modal Actions */
.bug-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.bug-btn-cancel {
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #4b5563;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bug-btn-cancel:hover {
  background: #f9fafb;
  color: #111827;
}

.bug-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.45rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0d9f6e 0%, #066845 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 159, 110, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.bug-btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 159, 110, 0.45);
}

.bug-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.spin-icon {
  animation: bugSpin 0.9s linear infinite;
}

@keyframes bugSpin {
  to { transform: rotate(360deg); }
}

/* Success View */
.bug-success-view {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.bug-success-check {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: grid;
  place-items: center;
  animation: bugBounceIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bugBounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.bug-success-view h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 0.5rem;
}

.bug-success-view p {
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

.bug-tracking-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  display: inline-block;
  margin: 0 auto;
}

.bug-tracking-box small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.bug-tracking-box strong {
  font-size: 1.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #066845;
  letter-spacing: 0.04em;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .bug-modal-card {
    padding: 1.35rem;
    border-radius: 16px;
  }
  
  .lp-fab-bug {
    bottom: 1rem;
    right: 1rem;
    padding: 0.65rem 0.95rem 0.65rem 0.8rem;
    font-size: 0.82rem;
  }
  
  .lp-fab-bug-icon {
    width: 24px;
    height: 24px;
  }
  
  .lp-nav-bug {
    padding: 0.42rem 0.8rem;
    font-size: 0.8rem;
  }
}
