/**
 * PDF Studio (aphousebd.com) — Core Design Engine
 * Location: public_html/assets/css/apps.css
 * Features: Mobile-First, High Contrast, Hardware-Accelerated Glassmorphism
 */

/* 1. Base Typography & Smooth Scroll */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2. Primary Mixed Gradient Button (#f97316 to rgb(0, 138, 80)) */
.btn-mixed {
  background: linear-gradient(135deg, #f97316 0%, rgb(0, 138, 80) 100%) !important;
  color: #ffffff !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.2s ease, 
              box-shadow 0.2s ease;
  will-change: transform;
}

.btn-mixed:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -4px rgba(249, 115, 22, 0.45);
}

.btn-mixed:active {
  transform: scale(0.97);
}

/* 3. Glass Panels & Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 30px 0 rgba(0, 51, 102, 0.06);
  transform: translateZ(0);
}

.dark .glass-card {
  background: rgba(0, 102, 102, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* 4. Custom Slim Scrollbar */
.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 138, 80, 0.35);
  border-radius: 9999px;
}
.dark .sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
}

/* 5. Tool Accordion & Drawer Box */
.subject-deck-card {
  width: 100%;
  border-radius: 24px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.subject-deck-card:hover {
  border-color: rgb(0, 138, 80);
}

.subject-tools-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-deck-card.is-open .subject-tools-drawer {
  grid-template-rows: 1fr;
}

.subject-tools-inner {
  overflow: hidden;
}

.subject-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  .subject-tools-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.action-chevron-disc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 138, 80, 0.1);
  border: 1px solid rgba(0, 138, 80, 0.25);
  color: rgb(0, 138, 80);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, background 0.2s ease;
}

.dark .action-chevron-disc {
  background: rgba(0, 51, 102, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  color: #6ee7b7;
}

.subject-deck-card.is-open .action-chevron-disc {
  transform: rotate(180deg);
  background: rgb(0, 138, 80);
  color: #ffffff;
}

/* 6. Live Floating Dock: Center with comfortable gap on Mobile, Right on Desktop */
.live-floating-dock {
  position: fixed;
  bottom: 86px; /* Provides a clean 16px gap above the mobile bottom bar */
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .live-floating-dock {
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: none;
  }
}

/* 7. Search Results Dropdown */
.search-results-box {
  max-height: 320px;
  overflow-y: auto;
}