/* ============================================================
   OH Theme Management — mobile-drawer.css v1.0.0
   Task 3: Professional SaaS Navigation Drawer
   Task 4: Mobile Pricing Swipe Slider
   Task 5: Responsive Rules
   ============================================================ */

/* ── Mobile Drawer ──────────────────────────────────────────── */

.otm-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(340px, 90vw);
  background: #ffffff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 48px rgba(99, 102, 241, 0.14);
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.otm-mobile-drawer.is-open {
  transform: translateX(0);
}

/* Overlay */
.otm-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 26, 0.45);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.otm-drawer-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer Header */
.otm-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #f0f0f8;
  flex-shrink: 0;
  background: #ffffff;
}

.otm-drawer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.otm-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #f4f4f8;
  border-radius: 10px;
  cursor: pointer;
  color: #6b7080;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

.otm-drawer-close:hover {
  background: #eef2ff;
  color: #5c5fef;
}

/* Drawer Body */
.otm-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 8px;
  scrollbar-width: thin;
  scrollbar-color: #e4e4ef transparent;
}

.otm-drawer-body::-webkit-scrollbar {
  width: 4px;
}

.otm-drawer-body::-webkit-scrollbar-thumb {
  background: #e4e4ef;
  border-radius: 2px;
}

/* Drawer Section */
.otm-drawer-section {
  margin-bottom: 8px;
}

.otm-drawer-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 10px 4px 6px;
}

/* Drawer Item */
.otm-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #0f0f1a;
  transition: background 0.16s ease, transform 0.16s ease;
  margin-bottom: 4px;
  cursor: pointer;
}

.otm-drawer-item:hover {
  background: #f4f4f8;
  transform: translateX(3px);
  color: #0f0f1a;
}

.otm-drawer-item:focus-visible {
  outline: 2px solid #5c5fef;
  outline-offset: 2px;
}

/* Drawer Icon */
.otm-drawer-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f4f4f8;
  color: #6b7080;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.16s, color 0.16s;
}

.otm-drawer-item:hover .otm-drawer-icon {
  background: #eef2ff;
  color: #5c5fef;
}

/* Drawer Label */
.otm-drawer-label {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.3;
}

/* Drawer Arrow */
.otm-drawer-arrow {
  color: #d1d5db;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: transform 0.15s ease, color 0.15s ease;
}

.otm-drawer-item:hover .otm-drawer-arrow {
  transform: translateX(3px);
  color: #5c5fef;
}

/* Drawer Footer */
.otm-drawer-footer {
  padding: 16px 16px 24px;
  border-top: 1px solid #f0f0f8;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: #fafafa;
}

/* Body lock when drawer open */
body.otm-drawer-open {
  overflow: hidden;
}

/* ── Hide hamburger on desktop/tablet by default ────────────── */
@media (min-width: 769px) {
  .otm-hamburger {
    display: none !important;
  }
  .otm-mobile-drawer,
  .otm-drawer-overlay {
    display: none !important;
  }
}

/* ── Show hamburger on mobile ───────────────────────────────── */
@media (max-width: 768px) {
  .otm-hamburger {
    display: flex !important;
  }

  /* Collapse desktop nav on mobile */
  .otm-nav {
    display: none !important;
  }

  /* Trim header actions on mobile — only hamburger visible */
  .otm-header__actions {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────────
   TASK 4 — MOBILE PRICING SWIPE SLIDER
   ────────────────────────────────────────────────────────────── */

/* Wrapper: visible only on mobile; wraps the slider viewport */
.otm-pricing-slider-wrap {
  display: none; /* shown via media query */
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-bottom: 12px;
}

/* Swipe track */
.otm-pricing-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 12px 20px 20px;
  /* Peek cards on left/right */
  padding-right: 40px;
  cursor: grab;
}

.otm-pricing-slider:active {
  cursor: grabbing;
}

.otm-pricing-slider::-webkit-scrollbar {
  display: none;
}

/* Each card in the slider */
.otm-pricing-slider .otm-pricing-card {
  flex: 0 0 80vw;
  max-width: 300px;
  min-width: 260px;
  scroll-snap-align: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  opacity: 0.7;
  transform: scale(0.95);
}

/* Active (center) card */
.otm-pricing-slider .otm-pricing-card.otm-pricing-card-active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 16px 48px rgba(92, 95, 239, 0.22);
}

/* Dot indicators */
.otm-pricing-dots {
  display: none; /* shown via media query */
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.otm-pricing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e4e4ef;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.otm-pricing-dot.active {
  background: #5c5fef;
  transform: scale(1.3);
  width: 20px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────
   TASK 5 — RESPONSIVE RULES
   ────────────────────────────────────────────────────────────── */

/* Desktop & Tablet: grid layout (unchanged) */
@media (min-width: 769px) {
  .otm-pricing-grid {
    display: grid; /* existing layout preserved */
  }

  .otm-pricing-slider-wrap,
  .otm-pricing-dots {
    display: none !important;
  }
}

/* Mobile: hide grid, show slider */
@media (max-width: 768px) {
  /* Hide the static grid */
  .otm-pricing-grid {
    display: none !important;
  }

  /* Show slider wrapper */
  .otm-pricing-slider-wrap {
    display: block;
  }

  /* Show dot indicators */
  .otm-pricing-dots {
    display: flex;
  }
}
