/* ══════════════════════════════════════════════════════════
   Schedule Page v4.0 — 2026 Amitabha Puja Sponsorship Form
   Exact replica of reference gemini-code HTML
   ══════════════════════════════════════════════════════════ */

.schedule-content {
  background: #f5f5f5;
  padding-top: 12px;
  padding-bottom: 60px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Inter", sans-serif;
}

/* ── Original weekly schedule content ── */
.schedule-inner {
  max-width: 800px;
  margin: 0 auto 30px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  padding: 28px;
}

.schedule-inner h2 {
  font-size: 20px;
  color: #8b0000;
  margin-top: 24px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

.schedule-inner p {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

.schedule-inner table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.schedule-inner th {
  background: #8b0000;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
}

.schedule-inner td {
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
}

/* ══════════════════════════════════════════════════════════
   PUJA CONTAINER — white card on gray background
   1:1 replica of gemini-code reference (header, flex, schedule, organizer)
   ══════════════════════════════════════════════════════════ */

.puja-container {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 15px rgba(0,0,0,.1);
  padding: 30px;
}

/* ── Header: centered, red bottom border ── */
.puja-container .header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #8b0000;
  padding-bottom: 15px;
}
.puja-container .header h1 {
  font-size: 26px;
  color: #8b0000;
  margin-bottom: 5px;
  letter-spacing: 1px;
}
.puja-container .header h2 {
  font-size: 20px;
  color: #333;
  margin-bottom: 10px;
}
.puja-container .header .date-time {
  font-size: 16px;
  font-weight: bold;
  color: #d9534f;
  background: #fff0f0;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #f5c6cb;
}

/* ── Content main: flex image left + text right ── */
.puja-container .content-main {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}
.puja-container .image-box {
  flex: 0 0 240px;
  text-align: center;
}
.puja-container .image-box img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  margin: 50px 0px 0px 0px;
}
.puja-container .text-box {
  flex: 1;
  font-size: 14px;
  text-align: justify;
  color: #333;
}
.puja-container .text-box p {
  margin-bottom: 12px;
  text-indent: 2em;
}
.puja-container .benefits-title {
  font-weight: bold;
  color: #8b0000;
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 15px;
}
.puja-container .benefits-list {
  list-style-type: none;
  padding-left: 0;
}
.puja-container .benefits-list li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 18px;
}
.puja-container .benefits-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: #8b0000;
  font-weight: bold;
}

/* ── Schedule section (programme timetable) ── */
.puja-container .schedule-section {
  margin-bottom: 25px;
}
.puja-container .section-header {
  background-color: #8b0000;
  color: #fff;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.5px;
}
.puja-container .schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
}
.puja-container .schedule-table td {
  border: 1px solid #ddd;
  padding: 10px;
  font-size: 14px;
}
.puja-container .schedule-table td.time {
  width: 35%;
  font-weight: bold;
  background-color: #fcf8e3;
  color: #8a6d3b;
  text-align: center;
}

/* ── Organizer info ── */
.puja-container .organizer-info {
  text-align: center;
  background: #fafafa;
  border: 1px dashed #ccc;
  padding: 15px;
  font-size: 14px;
  border-radius: 4px;
}
.puja-container .organizer-info h3 {
  font-size: 18px;
  color: #8b0000;
  margin-bottom: 4px;
}
.puja-container .organizer-info .en-name {
  font-weight: bold;
  color: #555;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════
   SPONSOR FORM CONTAINER — separate from puja info
   ══════════════════════════════════════════════════════════ */

.sponsor-form-container {
  max-width: 800px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 15px rgba(0,0,0,.1);
  padding: 30px;
}

.form-section-title {
  font-size: 22px;
  color: #8b0000;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #8b0000;
  text-align: center;
  letter-spacing: 1px;
}

/* ── Gap between puja-container and sponsor-form-container ── */
.puja-container {
  margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════
   SPONSORSHIP FORM TABLE
   ══════════════════════════════════════════════════════════ */

.form-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  margin-bottom: 20px;
}

.form-table th,
.form-table td {
  border: 1px solid #444;
  padding: 10px;
  vertical-align: top;
  font-size: 13.5px;
}

.form-table th {
  background-color: #f2f2f2;
  font-weight: bold;
  text-align: left;
}

.item-title {
  font-weight: bold;
  color: #8b0000;
  font-size: 15px;
}

.item-sub {
  color: #555;
  font-size: 12px;
  margin-bottom: 6px;
}

.item-desc {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  /* ref: no background */
  padding: 4px 8px;
  border-left: 3px solid #8b0000;
  line-height: 1.5;
}

.amount-cell {
  text-align: center;
  vertical-align: middle;
  font-weight: bold;
  font-size: 16px;
}

.amount-cell strong {
  color: #8b0000;
}

/* ── Input row (underline style to simulate form) ── */
.puja-input-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.puja-input-row label {
  white-space: nowrap;
  font-weight: bold;
  font-size: 13px;
}

.puja-input-line {
  flex: 1;
  border-bottom: 1px solid #666;
  height: 1px;
  min-height: 22px;
}

/* ── Checkbox group ── */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── Total row ── */
.total-row .puja-input-row label {
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════
   BANK BOX
   ══════════════════════════════════════════════════════════ */

.bank-box {
  background-color: #fff8e7;
  border: 1px solid #ffe0b2;
  padding: 15px;
  border-radius: 4px;
  font-size: 14px;
}

.bank-box p {
  margin-bottom: 4px;
}

.bank-box strong {
  color: #8b0000;
}

/* ══════════════════════════════════════════════════════════
   PRINT & SUBMIT BUTTONS
   ══════════════════════════════════════════════════════════ */

.puja-print-submit-row {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.puja-print-btn,
.puja-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

.puja-print-btn {
  background: #fff;
  color: #333;
  border: 2px solid #8b0000;
}
.puja-print-btn:hover {
  background: #fff5f5;
}
.gps-whatsapp-btn {
  background: #25D366 !important;
  color: #fff !important;
  border-color: #128C7E !important;
}
.gps-whatsapp-btn:hover {
  background: #128C7E !important;
}

.puja-submit-btn {
  background: #8b0000;
  color: #fff;
}
.puja-submit-btn:hover {
  background: #a00000;
}
.puja-submit-btn:active {
  transform: scale(0.97);
}
.puja-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Submit message ── */
.puja-submit-message {
  display: none;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   PRINT — sponsorship form only
   ══════════════════════════════════════════════════════════ */

@media print {
  body * { visibility: hidden; }
  body.gps-print-mode .sponsor-form-container,
  body.gps-print-mode .sponsor-form-container * {
    visibility: visible;
  }
  body.gps-print-mode .sponsor-form-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
    border: none;
    box-shadow: none;
  }
  body.gps-print-mode .no-print {
    display: none !important;
  }
  body.gps-print-mode .gps-message {
    display: none !important;
  }
  /* Hide overlay on print */
  .login-overlay {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .puja-container {
    padding: 15px;
  }

  .puja-container .content-main {
    flex-direction: column;
  }
  .puja-container .image-box {
    flex: none;
    max-width: 200px;
    margin: 0 auto;
  }

  .checkbox-group {
    flex-direction: column;
    gap: 5px;
  }

  .puja-container .header h1 {
    font-size: 20px;
  }

  .puja-container .header h2 {
    font-size: 17px;
  }

  .sponsor-form-container {
    padding: 15px;
  }

  .schedule-inner {
    padding: 15px;
  }

  .puja-print-btn,
  .puja-submit-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ===== Form Input Fields ===== */
.puja-input-field {
  border: none;
  border-bottom: 1px solid #666;
  background: transparent;
  padding: 2px 4px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  flex: 1;
  min-width: 80px;
  outline: none;
  transition: border-color 0.2s;
}
.puja-input-field:focus {
  border-bottom-color: #8b0000;
  border-bottom-width: 2px;
}
.puja-input-field:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-bottom-style: dashed;
}

/* ===== Login Overlay (registration gate) ===== */
.sponsor-logged-out {
  position: relative;
}
.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
}
.login-overlay-inner {
  max-width: 550px;
  width: 90%;
  background: #fff;
  border: 2px solid #daa520;
  border-radius: 16px;
  padding: 40px 30px 30px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.login-overlay-icon {
  font-size: 56px;
  margin-bottom: 10px;
}
.login-overlay-text {
  font-size: 20px;
  color: #8b0000;
  margin: 0 0 8px;
}
.login-overlay-sub {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 12px;
}
.login-overlay-footer {
  font-size: 14px;
  color: #999;
  font-style: italic;
  margin: 0 0 20px;
}
.login-overlay-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.login-overlay-buttons .puja-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.login-overlay-buttons .puja-btn:hover {
  transform: translateY(-1px);
}
.puja-btn-primary {
  background: #8b0000;
  color: #fff;
}
.puja-btn-primary:hover {
  background: #a00000;
  color: #fff;
}
.puja-btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
}
.puja-btn-secondary:hover {
  background: #e0e0e0;
  color: #333;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE: sponsor form table / inputs adapt to screen
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .form-table,
  .form-table tbody,
  .form-table thead,
  .form-table tr,
  .form-table th,
  .form-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .form-table thead {
    display: none;
  }
  .form-table {
    border: 1px solid #444;
    border-radius: 6px;
    overflow: hidden;
  }
  .form-table tr {
    padding: 0;
    margin: 0;
  }
  .form-table td {
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 12px 10px;
  }
  .form-table tr:last-child td {
    border-bottom: none;
  }
  /* Each row becomes a self-contained block: description first, then input/amount */
  .form-table td {
    text-align: left;
  }
  .form-table td[colspan],
  .form-table td:only-child {
    border-bottom: 1px solid #ddd;
  }
  .item-title {
    font-size: 15px;
  }
  .item-sub {
    font-size: 12px;
    margin: 2px 0 6px;
  }
  .item-desc {
    font-size: 12px;
    margin: 0 0 8px;
    padding: 4px 8px;
    border-left-width: 3px;
  }
  .amount-cell {
    font-size: 15px;
    text-align: left;
    margin-top: 2px;
  }

  /* Input rows wrap and fill width on phones */
  .puja-input-row {
    flex-wrap: wrap;
    gap: 6px 8px;
  }
  .puja-input-row label {
    white-space: normal;
    word-break: break-word;
    flex-basis: 100%;
  }
  .puja-input-row .puja-input-field,
  .puja-input-row input,
  .puja-input-row select {
    max-width: 100% !important;
  }
  .puja-input-field {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  .puja-input-sm {
    width: 100% !important;
  }
  .puja-input-line {
    flex-basis: 100%;
  }

  /* Checkbox group wraps nicely */
  .checkbox-group {
    gap: 10px;
  }
  .checkbox-item {
    font-size: 13px;
  }

  /* Sponsor dropdown rows: keep input full width, drop fixed widths */
  .puja-offering-select,
  .puja-phone-input,
  .puja-participant-name,
  .puja-total-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Buttons stack full-width on very small screens */
  .puja-print-submit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .puja-print-btn,
  .puja-submit-btn,
  .puja-btn-primary,
  .puja-btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 14px 16px;
  }
}

