/* ====================================================
   COMMERCIAL B - STYLE 3: CHINATOWN VINTAGE / FENG SHUI
   (6 Pages / 2 Months per Page Layout)
   ==================================================== */

/* Theme 1: Imperial Red & Gold (Default) */
body.s3-theme-red-gold {
  --s3-primary: #990000;
  --s3-primary-dark: #7f1d1d;
  --s3-accent: #b45309;
  --s3-gold: #fef08a;
  --s3-bg: #fffdf7;
  --s3-panel-bg: #fffbeb;
  --s3-weekday-bg: #fef3c7;
  --s3-grid-border: #fed7aa;
}

/* Theme 2: Jade Green & Gold */
body.s3-theme-jade-gold {
  --s3-primary: #064e3b;
  --s3-primary-dark: #022c22;
  --s3-accent: #b45309;
  --s3-gold: #fef08a;
  --s3-bg: #f7fdfa;
  --s3-panel-bg: #ecfdf5;
  --s3-weekday-bg: #d1fae5;
  --s3-grid-border: #a7f3d0;
}

/* Theme 3: Royal Crimson & Bronze */
body.s3-theme-crimson-bronze {
  --s3-primary: #701a1e;
  --s3-primary-dark: #4c0519;
  --s3-accent: #9a3412;
  --s3-gold: #fed7aa;
  --s3-bg: #fffafb;
  --s3-panel-bg: #fff1f2;
  --s3-weekday-bg: #ffe4e6;
  --s3-grid-border: #fecdd3;
}

/* Theme 4: Midnight Dragon & Gold */
body.s3-theme-midnight-gold {
  --s3-primary: #1e1b4b;
  --s3-primary-dark: #0f172a;
  --s3-accent: #b45309;
  --s3-gold: #fef08a;
  --s3-bg: #fafaf9;
  --s3-panel-bg: #f8fafc;
  --s3-weekday-bg: #e2e8f0;
  --s3-grid-border: #cbd5e1;
}

/* Base Sheet Styling */
.calendar-sheet.style-3 {
  font-family: "Times New Roman", "Songti SC", "SimSun", serif !important;
  background-color: var(--s3-bg) !important;
}

/* Tradisyunal na Red & Gold Frame */
.calendar-sheet.style-3 .calendar-frame {
  border: 4px solid var(--s3-primary);
  padding: 3px;
  background-color: var(--s3-bg);
  background-image: repeating-linear-gradient(
    0deg,
    var(--s3-accent),
    var(--s3-accent) 2px,
    transparent 2px,
    transparent 8px
  ) !important;
  border-radius: 0;
}

.calendar-sheet.style-3 .calendar-inner-core {
  background: #ffffff;
  border: 2px solid var(--s3-primary);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Banner Area */
.calendar-sheet.style-3 .banner-area {
  background: var(--s3-panel-bg);
  border-bottom: 2.5px double var(--s3-primary);
}

.calendar-sheet.style-3 .banner-placeholder {
  border: 2px dashed var(--s3-accent);
  background: var(--s3-panel-bg);
  color: var(--s3-primary);
  font-family: sans-serif;
  font-weight: 700;
}

/* Month Section Dividers */
.calendar-sheet.style-3 .month-row.top-month {
  border-bottom: 2.5px solid var(--s3-primary);
}

.calendar-sheet.style-3 .cal-block {
  border-right: 2px solid var(--s3-primary);
}

.calendar-sheet.style-3 .bottom-month .cal-block {
  border-left: 2px solid var(--s3-primary);
  border-right: none;
}

/* Header Bar ng Bawat Buwan */
.calendar-sheet.style-3 .month-header-bar {
  display: grid;
  grid-template-columns: 85px 1fr 85px;
  height: 42px;
  background: var(--s3-primary);
  border-bottom: 2px solid var(--s3-primary);
}

.calendar-sheet.style-3 .m-title {
  background: var(--s3-primary) !important;
  color: var(--s3-gold) !important;
  font-family: "Times New Roman", Georgia, serif !important;
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  letter-spacing: 3px !important;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4);
}

.calendar-sheet.style-3 .m-year {
  background: var(--s3-primary-dark) !important;
  color: var(--s3-gold) !important;
  font-family: "Impact", Arial Black, sans-serif !important;
  font-size: 1.6rem !important;
  border-left: 1.5px solid var(--s3-accent);
  border-right: 1.5px solid var(--s3-accent);
}

/* Weekday Bar */
.calendar-sheet.style-3 .cal-weekdays {
  background: var(--s3-weekday-bg);
  border-bottom: 1.5px solid var(--s3-primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.calendar-sheet.style-3 .cal-weekdays div {
  padding: 2px 0;
  border-right: 1px solid var(--s3-accent);
  color: var(--s3-primary);
  font-family: sans-serif;
}

.calendar-sheet.style-3 .cal-weekdays .sun-col {
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.1);
}

/* Grid & Cells */
.calendar-sheet.style-3 .cell {
  border-right: 1px solid var(--s3-grid-border);
  border-bottom: 1px solid var(--s3-grid-border);
  padding: 1px 3px;
}

/* Pinalaki at pinatingkad na Lunar Characters */
.calendar-sheet.style-3 .lunar-char {
  writing-mode: vertical-rl;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--s3-primary) !important;
  line-height: 1;
  font-family: "Songti SC", "SimSun", serif !important;
}

.calendar-sheet.style-3 .day-number {
  font-family: "Impact", Arial Black, sans-serif !important;
  font-size: 2.3rem;
  color: #1c1917;
}

.calendar-sheet.style-3 .sunday-cell .day-number,
.calendar-sheet.style-3 .holiday-cell .day-number {
  color: #b91c1c !important;
}

.calendar-sheet.style-3 .sunday-cell .lunar-char,
.calendar-sheet.style-3 .holiday-cell .lunar-char {
  color: #b91c1c !important;
}

.calendar-sheet.style-3 .holiday-name {
  font-family: sans-serif;
  font-size: 0.52rem;
  font-weight: bold;
  color: #b91c1c;
}

/* Split Cell (24/31 o 23/30) */
.calendar-sheet.style-3 .split-diagonal-svg line {
  stroke: var(--s3-primary) !important;
  stroke-width: 2 !important;
}

.calendar-sheet.style-3 .split-top-left,
.calendar-sheet.style-3 .split-bottom-right {
  font-family: "Impact", Arial Black, sans-serif !important;
  font-size: 1.8rem;
  color: #1c1917 !important;
}

.calendar-sheet.style-3 .sunday-cell .split-top-left,
.calendar-sheet.style-3 .sunday-cell .split-bottom-right,
.calendar-sheet.style-3 .holiday-cell .split-top-left,
.calendar-sheet.style-3 .holiday-cell .split-bottom-right {
  color: #b91c1c !important;
}

/* Moon SVG Phase Cells */
.calendar-sheet.style-3 .moon-cell circle,
.calendar-sheet.style-3 .moon-cell path {
  stroke: var(--s3-primary) !important;
}

.calendar-sheet.style-3 .moon-cell circle[fill="#dc2626"],
.calendar-sheet.style-3 .moon-cell path[fill="#dc2626"] {
  fill: var(--s3-primary) !important;
}

.calendar-sheet.style-3 .moon-title {
  color: var(--s3-primary) !important;
  font-family: sans-serif;
  font-size: 0.5rem;
}

.calendar-sheet.style-3 .moon-date {
  color: var(--s3-primary-dark) !important;
  font-family: sans-serif;
}

/* Sidebar Panels (Holidays + Notes + Mini Reference) */
.calendar-sheet.style-3 .sidebar-panel {
  background: var(--s3-panel-bg);
  gap: 3px;
  padding: 3px;
}

.calendar-sheet.style-3 .side-box {
  border: 1.2px solid var(--s3-primary);
  background: #ffffff;
}

.calendar-sheet.style-3 .side-title-tag {
  background: var(--s3-primary);
  color: var(--s3-gold);
  font-family: sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.8px;
}

.calendar-sheet.style-3 .side-holidays-list li b {
  color: var(--s3-primary);
}

.calendar-sheet.style-3 .notes-header {
  color: var(--s3-primary);
}

.calendar-sheet.style-3 .notes-line {
  border-bottom: 1px dashed var(--s3-accent);
}

.calendar-sheet.style-3 .side-mini-hdr {
  color: var(--s3-primary);
  border-bottom: 1px solid var(--s3-primary);
}

.calendar-sheet.style-3 .side-mini-wk {
  color: var(--s3-primary);
}

.calendar-sheet.style-3 .side-mini-grid {
  color: var(--s3-primary);
}

/* ====================================================
   MOBILE & TABLET AUTO-FIT (COMMERCIAL B STYLE 3)
   ==================================================== */
@media screen and (max-width: 900px) {
  .calendar-sheet.style-3 .month-header-bar {
    height: 7.5vw !important;
    grid-template-columns: 18% 1fr 18% !important;
  }
  .calendar-sheet.style-3 .m-title {
    font-size: 4.2vw !important;
    letter-spacing: 1px !important;
  }
  .calendar-sheet.style-3 .m-year {
    font-size: 3.8vw !important;
  }
  .calendar-sheet.style-3 .lunar-char {
    font-size: 1.5vw !important;
  }
  .calendar-sheet.style-3 .day-number {
    font-size: 5.5vw !important;
  }
  .calendar-sheet.style-3 .split-top-left,
  .calendar-sheet.style-3 .split-bottom-right {
    font-size: 4.2vw !important;
  }
  .calendar-sheet.style-3 .side-title-tag {
    font-size: 1.3vw !important;
  }
}