/**
 * Okumobil v2 - Free Educational Tools Styling
 */

/* Fullscreen Smartboard (Akıllı Tahta) Presentation Mode - Full Height & Width */
:fullscreen {
  background-color: #0f172a !important;
}

.tool-view-panel:fullscreen,
.tool-view-panel:-webkit-full-screen,
.tool-view-panel:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: #f8fafc !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: stretch !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 999999 !important;
}

/* Fullscreen inner container stretches 100% width and height */
.tool-view-panel:fullscreen > div,
.tool-view-panel:-webkit-full-screen > div,
.tool-view-panel:-ms-fullscreen > div {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 100% !important;
  overflow: hidden !important;
}

/* Fullscreen header */
.tool-view-panel:fullscreen > div > div:first-child,
.tool-view-panel:-webkit-full-screen > div > div:first-child,
.tool-view-panel:-ms-fullscreen > div > div:first-child {
  flex-shrink: 0 !important;
  border-radius: 0 !important;
  padding: 0.875rem 1.5rem !important;
}

/* Fullscreen scrollable body */
.tool-view-panel:fullscreen > div > div:nth-child(2),
.tool-view-panel:-webkit-full-screen > div > div:nth-child(2),
.tool-view-panel:-ms-fullscreen > div > div:nth-child(2) {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  height: 100% !important;
  padding: 1.25rem 1.75rem !important;
}

/* Battle of the Books Matrix Table Styles */
.botb-matrix-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.botb-matrix-table th,
.botb-matrix-table td {
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.botb-col-active {
  background-color: rgba(147, 51, 234, 0.08) !important;
  border-left: 2px solid #9333ea !important;
  border-right: 2px solid #9333ea !important;
}

.botb-col-active-header {
  background-color: #7e22ce !important;
  color: #ffffff !important;
}

.botb-score-cell {
  cursor: pointer;
  user-select: none;
}

.botb-score-cell:hover {
  filter: brightness(0.96);
}

/* Playing Help Modal Overlay */
#botb-help-modal {
  z-index: 1000000 !important;
}

/* Timer Circular Progress Animation */
#timer-progress-ring {
  transform-origin: center;
  transition: stroke-dashoffset 1s linear;
}

/* Badge Canvas Responsive Shadow */
#badge-canvas {
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.12)) drop-shadow(0 8px 10px rgba(0, 0, 0, 0.08));
}

/* Smooth Tab Transitions */
.tool-view-panel {
  animation: toolFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* =========================================================
   Tool 2: Silent Reading Timer - Fullscreen Full Height
   ========================================================= */
#tool-view-silent-reading-timer:fullscreen .tool-panel-body,
#tool-view-silent-reading-timer:-webkit-full-screen .tool-panel-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 2rem 1.5rem !important;
  background: radial-gradient(circle at center, #ffffff 0%, #f8fafc 100%) !important;
  overflow-y: auto !important;
}

#tool-view-silent-reading-timer:fullscreen .timer-zen-container,
#tool-view-silent-reading-timer:-webkit-full-screen .timer-zen-container {
  margin: auto !important;
  width: 100% !important;
  max-width: 52rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

#tool-view-silent-reading-timer:fullscreen .timer-display-ring,
#tool-view-silent-reading-timer:-webkit-full-screen .timer-display-ring {
  width: clamp(18rem, 38vh, 26rem) !important;
  height: clamp(18rem, 38vh, 26rem) !important;
}

#tool-view-silent-reading-timer:fullscreen #timer-digits,
#tool-view-silent-reading-timer:-webkit-full-screen #timer-digits {
  font-size: clamp(3.75rem, 8.5vh, 5.5rem) !important;
}

#tool-view-silent-reading-timer:fullscreen #timer-start-btn,
#tool-view-silent-reading-timer:-webkit-full-screen #timer-start-btn {
  padding: 0.875rem 2.5rem !important;
  font-size: 1.125rem !important;
}

/* =========================================================
   Tool 3: Book Badge Designer - Fullscreen Full Height
   ========================================================= */
#tool-view-book-badge-designer:fullscreen .tool-panel-body,
#tool-view-book-badge-designer:-webkit-full-screen .tool-panel-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 1.5rem 2.5rem !important;
  overflow-y: auto !important;
  background: #f8fafc !important;
}

#tool-view-book-badge-designer:fullscreen .badge-studio-grid,
#tool-view-book-badge-designer:-webkit-full-screen .badge-studio-grid {
  margin: auto !important;
  width: 100% !important;
  max-width: 82rem !important;
}

/* =========================================================
   Ambient Music Soundwave Equalizer Indicator
   ========================================================= */
.soundwave-indicator {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 12px;
}

.soundwave-bar {
  display: inline-block;
  width: 2px;
  background-color: currentColor;
  border-radius: 9999px;
  animation: soundwavePulse 0.8s ease-in-out infinite alternate;
}

.soundwave-bar:nth-child(1) {
  height: 6px;
  animation-delay: 0.1s;
}

.soundwave-bar:nth-child(2) {
  height: 12px;
  animation-delay: 0.35s;
}

.soundwave-bar:nth-child(3) {
  height: 8px;
  animation-delay: 0.2s;
}

@keyframes soundwavePulse {
  0% {
    transform: scaleY(0.3);
    opacity: 0.5;
  }
  100% {
    transform: scaleY(1.15);
    opacity: 1;
  }
}


