/* ============================================
   PPTX AI Generator — Custom Styles
   ============================================ */

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #4b5563;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* --- Loading Spinner --- */
.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* --- Accordion Animation --- */
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-in-out, opacity 0.25s ease-in-out;
  opacity: 0.7;
}
.accordion-body.accordion-open {
  opacity: 1;
}
.accordion-icon {
  transition: transform 0.25s ease;
}
.accordion-icon.rotate-180 {
  transform: rotate(180deg);
}

/* --- Toast Slide-in/out Animation --- */
.toast {
  animation: toastSlideIn 0.3s ease-out forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.toast-dismissed {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* --- Result Card Entrance Animation --- */
.result-entrance {
  animation: resultEntrance 0.5s ease-out;
}

@keyframes resultEntrance {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Progress Bar Animation --- */
#progressBar {
  transition: width 0.5s ease;
}

/* --- Sidebar Mobile Responsive --- */
@media (max-width: 1023px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
  }
}

@media (min-width: 1024px) {
  #sidebar {
    transform: translateX(0) !important;
  }
}

/* --- Tailwind Overrides / Enhancements --- */

/* Better select styling for dark theme */
select option {
  background-color: #1f2937;
  color: #f9fafb;
}

/* Smooth transitions for interactive elements */
button, a, input, select, textarea {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus ring consistency */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* Subtle table row hover */
#historyBody tr {
  transition: background-color 0.15s ease;
}

/* Green download button hover */
#downloadBtn {
  transition: all 0.2s ease;
}

/* Disabled button state */
button:disabled {
  pointer-events: none;
}

/* Sidebar toggle button visibility on large screens */
#sidebarToggle {
  transition: opacity 0.2s ease;
}
@media (min-width: 1024px) {
  #sidebarToggle {
    display: flex !important;
    opacity: 0;
    pointer-events: none;
  }
}

/* Accordion item hover state */
.accordion-item {
  transition: box-shadow 0.2s ease;
}

/* History download icon button */
.history-download-btn {
  transition: background-color 0.15s ease, color 0.15s ease;
}
