/* ====================================================
   STYLE 3: CHINATOWN VINTAGE / LUCKY FENG SHUI
   ==================================================== */

/* 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;
}

.calendar-sheet.style-3 {
  font-family: "Times New Roman", "Songti SC", "SimSun", serif !important;
  background-color: var(--s3-bg) !important;
}

.calendar-sheet.style-3 .calendar-frame {
  border: 5px solid var(--s3-primary);
  padding: 5px;
  background: 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;
}

.calendar-sheet.style-3 .banner-area {
  height: 36%;
  background: var(--s3-panel-bg);
  border-bottom: 3px 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;
}

.calendar-sheet.style-3 .cal-header {
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  height: 66px;
  border-bottom: 3px solid var(--s3-primary);
  background: var(--s3-primary);
}

.calendar-sheet.style-3 .month-box {
  background: var(--s3-primary) !important;
  color: var(--s3-gold) !important;
  font-family: "Times New Roman", Georgia, serif !important;
  font-size: 2.8rem !important;
  font-weight: 900 !important;
  letter-spacing: 4px !important;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.4);
}

.calendar-sheet.style-3 .year-box {
  background: var(--s3-primary-dark) !important;
  color: var(--s3-gold) !important;
  font-family: "Impact", Arial Black, sans-serif !important;
  font-size: 2.6rem !important;
  border-left: 2px solid var(--s3-accent);
  border-right: 2px solid var(--s3-accent);
}

.calendar-sheet.style-3 .weekdays-row {
  background: var(--s3-weekday-bg);
  border-bottom: 2px solid var(--s3-primary);
  font-size: 1rem;
  font-weight: 900;
}

.calendar-sheet.style-3 .weekdays-row div {
  padding: 5px 0;
  border-right: 1px solid var(--s3-accent);
  color: var(--s3-primary);
  font-family: sans-serif;
}

.calendar-sheet.style-3 .weekdays-row .sun-col {
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.1);
}

.calendar-sheet.style-3 .days-grid {
  border-bottom: 2px solid var(--s3-primary);
}

.calendar-sheet.style-3 .cell {
  border-right: 1px solid var(--s3-grid-border);
  border-bottom: 1px solid var(--s3-grid-border);
  padding: 3px 5px;
}

.calendar-sheet.style-3 .cell-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.calendar-sheet.style-3 .lunar-char {
  writing-mode: vertical-rl;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--s3-primary) !important;
  line-height: 1.1;
  font-family: "Songti SC", "SimSun", serif !important;
}

.calendar-sheet.style-3 .day-number {
  font-family: "Impact", Arial Black, sans-serif !important;
  font-size: 3.5rem;
  font-weight: 900;
  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.62rem;
  font-weight: bold;
  color: #b91c1c;
}

/* Split Cell Fix para sa Style 3 (24/31) */
.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 {
  color: #1c1917 !important;
  font-family: "Impact", Arial Black, sans-serif !important;
}

.calendar-sheet.style-3 .sunday-cell .split-top-left,
.calendar-sheet.style-3 .sunday-cell .split-bottom-right {
  color: #b91c1c !important;
}

.calendar-sheet.style-3 .holiday-cell .split-top-left,
.calendar-sheet.style-3 .holiday-cell .split-bottom-right {
  color: #b91c1c !important;
}

.calendar-sheet.style-3 .bottom-panel {
  border-top: 1px solid var(--s3-primary);
  background: var(--s3-panel-bg);
  gap: 6px;
  padding: 5px;
}

.calendar-sheet.style-3 .mini-cal,
.calendar-sheet.style-3 .holiday-box {
  border: 1.5px solid var(--s3-primary);
  background: #ffffff;
}

.calendar-sheet.style-3 .section-tag {
  background: var(--s3-primary);
  color: var(--s3-gold);
  font-family: sans-serif;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.calendar-sheet.style-3 .holiday-col li b {
  color: var(--s3-primary);
}

.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;
}
.calendar-sheet.style-3 .moon-date {
  color: var(--s3-primary-dark) !important;
}

/* Mobile Auto-Fit */
@media screen and (max-width: 900px) {
  .calendar-sheet.style-3 .calendar-frame {
    border-width: 3px;
    padding: 2px;
  }
  .calendar-sheet.style-3 .cal-header {
    height: 11vw !important;
    grid-template-columns: 22% 1fr 22% !important;
  }
  .calendar-sheet.style-3 .month-box {
    font-size: 6.8vw !important;
    letter-spacing: 1.5px !important;
  }
  .calendar-sheet.style-3 .year-box {
    font-size: 6vw !important;
  }
  .calendar-sheet.style-3 .weekdays-row {
    font-size: 2.6vw !important;
  }
  .calendar-sheet.style-3 .lunar-char {
    font-size: 2vw !important;
  }
  .calendar-sheet.style-3 .day-number {
    font-size: 8.5vw !important;
  }
  .calendar-sheet.style-3 .split-top-left,
  .calendar-sheet.style-3 .split-bottom-right {
    font-size: 5.8vw !important;
  }
  .calendar-sheet.style-3 .holiday-name {
    font-size: 1.5vw !important;
  }
  .calendar-sheet.style-3 .bottom-panel {
    height: 24vw !important;
    gap: 3px !important;
    padding: 2px !important;
  }
  .calendar-sheet.style-3 .section-tag {
    font-size: 1.6vw !important;
  }
  .calendar-sheet.style-3 .holiday-col li {
    font-size: 1.35vw !important;
  }
  .calendar-sheet.style-3 .holiday-col li b {
    width: 7.5vw !important;
    font-size: 1.35vw !important;
  }
}