/* ==========================================================================
   Police Modern School, 25th Bn PAC - Daily Classroom English Sentences
   Exact Pixel-Perfect Match to User's Print Layout Specification
   ========================================================================== */

:root {
  --primary-blue: #004ba8;       /* Exact left border blue & number color */
  --header-blue: #0352b5;        /* DAILY CLASSROOM ENGLISH SENTENCES subtitle */
  --card-bg: #fcfdfe;            /* Clean light card background */
  --card-border: #e2e8f0;        /* Subtle card border */
  --icon-border: #cbd5e1;        /* Speaker box border */
  --icon-color: #8596a6;         /* Soft muted speaker icon color */
  --text-color: #000000;         /* Bold deep black sentence text */
  --font-hi: 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-en);
  background-color: #f1f5f9;
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

/* Minimal Screen Floating Toolbar (Hidden in Print) */
.screen-toolbar {
  width: 100%;
  max-width: 210mm;
  padding: 10px 16px;
  margin-top: 10px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  z-index: 50;
}

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.toolbar-badge {
  background: #d97706;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-hi);
}

.toolbar-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font-en);
}

.tool-btn-light {
  background: #ffffff;
  color: #0f172a;
}

.tool-btn-light:hover {
  background: #e2e8f0;
}

.tool-btn-dark {
  background: #1e293b;
  color: #ffffff;
  border-color: #334155;
}

.tool-btn-dark:hover {
  background: #334155;
}

/* A4 Sheet Container */
.sheet-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 15px 10px 40px 10px;
}

.a4-page {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 12mm 16mm 14mm 16mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ==========================================================================
   Header Section (Exact Match to Reference Image)
   ========================================================================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid #000000;
  margin-bottom: 18px;
  gap: 12px;
}

.header-logo-wrap {
  width: 78px;
  height: 78px;
  min-width: 78px;
  max-width: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo {
  width: 78px;
  height: 78px;
  max-width: 78px;
  max-height: 78px;
  object-fit: contain;
  display: block;
}

.header-titles {
  flex: 1;
  text-align: center;
}

.title-main {
  font-family: var(--font-hi);
  font-size: 25px;
  font-weight: 900;
  color: #000000;
  line-height: 1.15;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.title-sub {
  font-family: var(--font-hi);
  font-size: 17px;
  font-weight: 800;
  color: #000000;
  line-height: 1.25;
  margin-top: 3px;
  white-space: nowrap;
}

.title-tagline {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 800;
  color: var(--header-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 5px;
  white-space: nowrap;
}

.header-spacer {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
  flex-shrink: 0;
}

/* ==========================================================================
   10 Sentence Cards (Exact Match to Reference Image)
   ========================================================================== */
.sentences-container {
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.sentence-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 5.5px solid var(--primary-blue);
  border-radius: 7px;
  padding: 10px 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.sentence-card:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sentence-card.speaking {
  background-color: #eff6ff !important;
  border-color: #93c5fd !important;
}

.sentence-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.sentence-number {
  font-family: var(--font-en);
  color: var(--primary-blue);
  font-weight: 800;
  font-size: 15px;
  min-width: 26px;
  flex-shrink: 0;
}

.sentence-text {
  font-family: var(--font-en);
  color: #000000;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.speaker-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--icon-border);
  border-radius: 6px;
  background-color: #ffffff;
  color: var(--icon-color);
  margin-left: 10px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.sentence-card:hover .speaker-box {
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

/* Toast Message */
.toast-notice {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 100;
}

.toast-notice.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Strict A4 Print Layout Setup (Matches Screenshot Exactly)
   ========================================================================== */
@page {
  size: A4 portrait;
  margin: 10mm 14mm 10mm 14mm;
}

@media print {
  *, *::before, *::after {
    color: #000000 !important;
    text-shadow: none !important;
    box-sizing: border-box !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    display: block !important;
  }

  .no-print {
    display: none !important;
  }

  .sheet-container {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
  }

  .a4-page {
    box-shadow: none !important;
    border: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    display: block !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .page-header {
    padding-bottom: 10px !important;
    border-bottom: 2px solid #000000 !important;
    margin-bottom: 16px !important;
  }

  .header-logo-wrap,
  .header-logo {
    width: 24mm !important;
    height: 24mm !important;
    min-width: 24mm !important;
    max-width: 24mm !important;
    object-fit: contain !important;
  }

  .header-spacer {
    width: 24mm !important;
    min-width: 24mm !important;
    max-width: 24mm !important;
    display: block !important;
  }

  .title-main {
    font-size: 21pt !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .title-sub {
    font-size: 14.5pt !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    margin-top: 2px !important;
  }

  .title-tagline {
    font-size: 9.5pt !important;
    font-weight: 800 !important;
    color: #0352b5 !important;
    letter-spacing: 0.08em !important;
    margin-top: 4px !important;
    white-space: nowrap !important;
  }

  .sentences-container {
    gap: 10px !important;
  }

  .sentence-card {
    background-color: #ffffff !important;
    border: 1px solid #dce5ef !important;
    border-left: 5.5px solid #004ba8 !important;
    border-radius: 6px !important;
    padding: 9px 12px !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .sentence-number {
    color: #004ba8 !important;
    font-size: 12pt !important;
    font-weight: 800 !important;
    min-width: 24px !important;
  }

  .sentence-text {
    font-size: 11.5pt !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #000000 !important;
  }

  .speaker-box {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    color: #94a3b8 !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Mobile Screen Tuning */
@media (max-width: 640px) {
  .screen-toolbar {
    border-radius: 0;
    margin-top: 0;
  }
  .a4-page {
    width: 100%;
    padding: 1rem 0.75rem;
    min-height: auto;
  }
  .title-main {
    font-size: 1.35rem;
    white-space: normal;
  }
  .title-sub {
    font-size: 1.05rem;
    white-space: normal;
  }
  .title-tagline {
    font-size: 0.7rem;
    white-space: normal;
  }
  .sentence-text {
    font-size: 0.95rem;
  }
}
