/* ═══════════════════════════════════════════════════════
   AGC Routine Plugin — Scoped Styles
   All rules scoped under #agc-routine-wrap to prevent
   bleeding into or being affected by other plugins/themes.
═══════════════════════════════════════════════════════ */

/* 1. FULL RESET inside our wrapper */
#agc-routine-wrap,
#agc-routine-wrap * {
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased;
}

/* 2. Wrapper itself — no overflow clipping */
#agc-routine-wrap {
  overflow: visible !important;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 3. ── SELECT DROPDOWNS ──────────────────────────────
   Force correct colors — themes often override these */
#agc-routine-wrap select {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  overflow: visible !important;
  position: relative;
  z-index: 9999;
  max-height: none !important;
  height: auto !important;
  line-height: 1.5 !important;
  min-height: 44px !important;
  display: block !important;
}

/* Subject select: dark text on white */
#agc-routine-wrap select.agc-select-light {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* Class select: white text on dark green */
#agc-routine-wrap select.agc-select-dark {
  background-color: #065f46 !important;
  color: #ffffff !important;
  border-color: rgba(16,185,129,0.5) !important;
}

/* Option text always readable */
#agc-routine-wrap select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-weight: 600;
}

/* 4. Prevent parent theme overflow clipping dropdowns */
#agc-routine-wrap header,
#agc-routine-wrap .agc-header-inner,
#agc-routine-wrap div,
#agc-routine-wrap section,
#agc-routine-wrap main,
#agc-routine-wrap footer {
  overflow: visible;
}

/* 5. Scrollable day pills row */
#agc-routine-wrap .agc-scroll-x {
  overflow-x: auto !important;
  overflow-y: visible !important;
}
#agc-routine-wrap .agc-scroll-x::-webkit-scrollbar { display: none; }
#agc-routine-wrap .agc-scroll-x { -ms-overflow-style: none; scrollbar-width: none; }

/* 6. Smooth button transitions */
#agc-routine-wrap button {
  transition: all 0.15s ease;
  cursor: pointer;
}

/* 7. Input/textarea base */
#agc-routine-wrap input,
#agc-routine-wrap textarea {
  font-family: inherit;
  line-height: normal;
  color: #1e293b !important;
  background-color: #ffffff;
}

/* ── MOBILE SPECIFIC ─────────────────────────── */
@media (max-width: 640px) {
  /* Tighter card radius on small screens */
  #agc-routine-wrap .rounded-\[2rem\] {
    border-radius: 1rem !important;
  }

  /* Larger touch targets for buttons */
  #agc-routine-wrap button {
    min-height: 40px;
  }

  /* Day view class badge wrapping */
  #agc-routine-wrap .flex.flex-wrap.gap-1\.5 {
    gap: 4px !important;
  }

  /* Subject filter result rows - stack icon and text properly */
  #agc-routine-wrap .p-5.rounded-2xl.border.flex.items-center.justify-between {
    padding: 12px !important;
  }

  /* Prevent any horizontal page overflow */
  #agc-routine-wrap {
    max-width: 100vw;
    overflow-x: hidden !important;
  }
}
