/**
 * app.css
 * Custom styles - minimal, complementing Tailwind
 */

/* ==================
   Tool Cards
   ================== */
.tool-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* ==================
   Textareas
   ================== */
.tool-textarea {
  width: 100%;
  min-height: 10rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafafa;
  color: #1f2937;
}

.tool-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
}

/* ==================
   Buttons
   ================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: white;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.625rem;
  background: white;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-icon:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

/* ==================
   Drop Zone
   ================== */
.drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
}

.drop-zone:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.drop-zone.drag-over {
  border-color: #3b82f6;
  background: #dbeafe;
}

.drop-zone:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================
   Progress Bar
   ================== */
.progress-track {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 9999px;
  transition: width 0.2s ease;
}

/* ==================
   Messages
   ================== */
.error-msg {
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  color: #dc2626;
  font-size: 0.8125rem;
}

.warn-msg {
  padding: 0.5rem 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  color: #92400e;
  font-size: 0.8125rem;
}

/* ==================
   Toast Notification
   ================== */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: #1f2937;
  color: white;
}

.toast-error {
  background: #dc2626;
  color: white;
}

/* ==================
   Cookie Banner
   ================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner.hiding {
  transform: translateY(100%);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.cookie-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: #6b7280;
}

.cookie-banner-text p {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
}

.cookie-learn-more {
  font-size: 0.875rem;
  color: #3b82f6;
  text-decoration: underline;
  white-space: nowrap;
}

.cookie-learn-more:hover {
  color: #2563eb;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-cookie-decline {
  padding: 0.5rem 1rem;
  background: white;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-cookie-decline:hover {
  background: #f9fafb;
}

.btn-cookie-accept {
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-cookie-accept:hover {
  background: #2563eb;
}

/* ==================
   Ad Slots
   ================== */
.ad-slot {
  min-height: 90px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-slot-banner {
  width: 100%;
  min-height: 90px;
}

.ad-slot-rect {
  width: 100%;
  min-height: 250px;
}

/* ==================
   Docs page styles
   ================== */
.docs-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.docs-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.docs-content p {
  color: #374151;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.docs-content code {
  background: #f3f4f6;
  color: #111827;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', Courier, monospace;
}

.docs-content pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.docs-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
}

.docs-content ul, .docs-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.docs-content li {
  color: #374151;
  margin-bottom: 0.375rem;
  line-height: 1.6;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.docs-content th {
  background: #f3f4f6;
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.docs-content td {
  padding: 0.625rem 0.75rem;
  border: 1px solid #e5e7eb;
  color: #4b5563;
}

.docs-content tr:nth-child(even) td {
  background: #f9fafb;
}

/* ==================
   Responsive helpers
   ================== */
@media (max-width: 640px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner-text {
    align-items: flex-start;
  }

  .tool-textarea {
    min-height: 8rem;
  }
}
