/* =========================================================
   style.css  –  Light blue/teal medical theme
   ========================================================= */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f7ff;
  color: #333;
  min-height: 100vh;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
header {
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  padding: 0;
  box-shadow: 0 2px 12px rgba(0,119,182,.25);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
}
.logo {
  font-size: 20px; font-weight: 700; color: #fff;
  letter-spacing: .5px;
}
.header-tagline {
  font-size: 12px; color: rgba(255,255,255,.8);
  display: none;
}
@media(min-width:600px){ .header-tagline { display: block; } }

/* ── Hero banner ── */
.hero {
  background: linear-gradient(135deg, #e8f4fd 0%, #cce8f4 100%);
  border-bottom: 1px solid #b3d8ef;
  padding: 40px 16px 32px;
  text-align: center;
}
.hero h1 { font-size: 26px; color: #0077b6; margin-bottom: 8px; }
.hero p  { font-size: 14px; color: #556; max-width: 560px; margin: 0 auto; }

/* ── Section heading ── */
.section-title {
  font-size: 15px; font-weight: 700; color: #0077b6;
  text-transform: uppercase; letter-spacing: 1px;
  border-left: 4px solid #00b4d8; padding-left: 12px;
  margin: 28px 0 16px;
}

/* ── Form card ── */
.form-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,119,182,.10);
  padding: 32px;
  margin: 28px 0 48px;
}

/* ── Form grid ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media(max-width:600px){ .form-grid { grid-template-columns: 1fr; } }

/* ── Form group ── */
.form-group { display: flex; flex-direction: column; }
.form-group label {
  font-size: 12px; font-weight: 600; color: #555;
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 6px;
}
.form-group label span.req { color: #e63946; margin-left: 2px; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid #cde0f0;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  background: #f8fbff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0,119,182,.12);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── Module cards ── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.module-card {
  border: 2px solid #cde0f0;
  border-radius: 10px;
  padding: 14px 12px;
  cursor: pointer;
  background: #f8fbff;
  transition: all .2s;
  position: relative;
}
.module-card:hover:not(.full-slot) {
  border-color: #00b4d8;
  background: #e8f7fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,180,216,.15);
}
.module-card.selected {
  border-color: #0077b6;
  background: #e0f0fb;
  box-shadow: 0 0 0 3px rgba(0,119,182,.15);
}
.module-card.full-slot {
  opacity: .5; cursor: not-allowed; background: #f5f5f5;
  border-color: #ddd;
}
.module-card input[type=radio] { position: absolute; opacity: 0; }
.module-name { font-size: 13px; font-weight: 600; color: #0077b6; margin-bottom: 6px; line-height: 1.3; }
.seat-bar-wrap { background: #e0eef8; border-radius: 4px; height: 6px; margin: 6px 0; overflow: hidden; }
.seat-bar { height: 100%; border-radius: 4px; background: #00b4d8; transition: width .4s ease; }
.seat-bar.warn  { background: #f4a261; }
.seat-bar.full  { background: #e63946; }
.seat-text { font-size: 11px; color: #777; }
.seat-text strong { color: #333; }
.full-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: #e63946; color: #fff; padding: 2px 8px;
  border-radius: 10px; margin-top: 4px;
}

/* ── Slot cards ── */
.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:400px){ .slot-grid { grid-template-columns: 1fr; } }
.slot-card {
  border: 2px solid #cde0f0; border-radius: 10px;
  padding: 16px; cursor: pointer; background: #f8fbff;
  transition: all .2s; text-align: center;
}
.slot-card:hover:not(.full-slot) { border-color: #00b4d8; background: #e8f7fd; }
.slot-card.selected { border-color: #0077b6; background: #e0f0fb; }
.slot-card.full-slot { opacity:.5; cursor:not-allowed; background:#f5f5f5; border-color:#ddd; }
.slot-card input[type=radio] { position:absolute; opacity:0; }
.slot-icon { font-size: 24px; margin-bottom: 6px; }
.slot-name { font-size: 15px; font-weight: 700; color: #0077b6; }
.slot-time { font-size: 12px; color: #666; margin-top: 2px; }
.slot-seats { font-size: 12px; color: #888; margin-top: 6px; }

/* ── Duration radio ── */
.duration-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.duration-card {
  flex: 1; min-width: 100px;
  border: 2px solid #cde0f0; border-radius: 10px;
  padding: 14px; cursor: pointer; background: #f8fbff;
  transition: all .2s; text-align: center;
  position: relative;
}
.duration-card input[type=radio] { position:absolute; opacity:0; }
.duration-card:hover { border-color: #00b4d8; background: #e8f7fd; }
.duration-card.selected { border-color: #0077b6; background: #e0f0fb; }
.duration-days { font-size: 22px; font-weight: 700; color: #0077b6; }
.duration-label { font-size: 12px; color: #777; }

/* ── Submit button ── */
.submit-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  color: #fff; font-size: 16px; font-weight: 700;
  border: none; border-radius: 50px;
  cursor: pointer; transition: all .2s;
  margin-top: 8px; letter-spacing: .5px;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,119,182,.35); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Seat info panel ── */
.seat-info-panel {
  background: #e8f4fd; border-radius: 10px;
  padding: 14px 18px; margin: 16px 0;
  border: 1px solid #b3d8ef;
  display: none;
}
.seat-info-panel.show { display: block; }
.seat-info-panel .seat-summary { font-size: 13px; color: #333; }
.seat-info-panel.danger { background: #fdecea; border-color: #f5c6cb; }
.seat-info-panel.danger .seat-summary { color: #c0392b; }

/* ── Alert ── */
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 20px;
  font-size: 14px;
}
.alert-danger  { background: #fdecea; border: 1px solid #f5c6cb; color: #c0392b; }
.alert-success { background: #e6f9f1; border: 1px solid #a8e6cf; color: #217a4f; }

/* ── Footer ── */
footer {
  background: #0077b6; color: rgba(255,255,255,.85);
  text-align: center; padding: 18px;
  font-size: 13px; margin-top: 40px;
}

/* ── Loading spinner ── */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid #e0eef8; margin: 24px 0; }

/* =========================================================
   Payment section styles
   ========================================================= */

/* ── Payment info banner ── */
.payment-info-box {
  background: linear-gradient(135deg, #e8f4fd, #f0faf8);
  border: 1.5px solid #9ecde8;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
}
.payment-info-icon { font-size: 36px; flex-shrink: 0; line-height: 1; }
.payment-info-text strong { display: block; font-size: 15px; color: #0077b6; margin-bottom: 6px; }
.payment-info-text p { font-size: 13px; color: #555; margin: 0 0 12px; }

.payment-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media(max-width:500px){ .payment-details-grid { grid-template-columns: 1fr; } }

.pd-item {
  background: #fff;
  border-radius: 7px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  border: 1px solid #cde0f0;
}
.pd-label { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: #888; }
.pd-val   { font-size: 14px; font-weight: 700; color: #333; margin-top: 2px; }
.pay-amount { color: #0077b6; font-size: 16px; }

/* ── File upload ── */
.file-upload-wrap { width: 100%; }
.file-upload-ui {
  border: 2px dashed #9ecde8;
  border-radius: 10px;
  padding: 22px 16px;
  text-align: center;
  background: #f8fbff;
  cursor: pointer;
  transition: all .2s;
}
.file-upload-ui:hover {
  border-color: #0077b6;
  background: #e8f4fd;
}
.file-upload-icon  { font-size: 28px; margin-bottom: 6px; }
.file-upload-label { font-size: 14px; font-weight: 600; color: #0077b6; }
.file-upload-hint  { font-size: 11px; color: #999; margin-top: 3px; }

.file-preview {
  border: 1.5px solid #9ecde8;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.file-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #f0f7ff;
  padding: 8px;
}
.file-preview-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #e8f4fd;
  font-size: 12px;
  color: #555;
  flex-wrap: wrap;
  gap: 6px;
}
.remove-file-btn {
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.remove-file-btn:hover { background: #c1121f; }

/* ── Field hint & error ── */
.field-hint  { font-size: 11px; color: #999; margin-top: 4px; }
.field-error { font-size: 12px; color: #e63946; margin-top: 4px; }

/* ── Payment verified banner ── */
.payment-verified-banner {
  background: #e6f9f1;
  border: 1.5px solid #a8e6cf;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 13px;
  color: #217a4f;
  font-weight: 600;
  margin-top: 12px;
}

/* ── Admin payment status badges ── */
.ps-pending  { background: #f4a261; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.ps-verified { background: #2d9a60; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.ps-rejected { background: #e63946; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }

/* ── Modal for screenshot preview ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 999;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 12px;
  max-width: 90vw; max-height: 90vh;
  overflow: auto; padding: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
  position: relative;
}
.modal-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 22px; cursor: pointer; color: #555;
  background: none; border: none;
}
.modal-box img { max-width: 100%; border-radius: 8px; display: block; }

/* =========================================================
   QR Code payment layout
   ========================================================= */

/* Override old payment-info-box to use two-column layout */
.payment-info-box {
  background: linear-gradient(135deg, #e8f4fd, #f0faf8);
  border: 1.5px solid #9ecde8;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: stretch;
  flex-wrap: wrap;
}

/* Left side – bank details */
.payment-info-left {
  flex: 1 1 300px;
  display: flex;
  gap: 14px;
  padding-right: 22px;
}

/* Vertical divider between left and right */
.payment-divider {
  width: 1.5px;
  background: linear-gradient(to bottom, transparent, #9ecde8 20%, #9ecde8 80%, transparent);
  margin: 0 4px;
  flex-shrink: 0;
}
@media(max-width:640px) {
  .payment-divider {
    width: 100%;
    height: 1.5px;
    background: linear-gradient(to right, transparent, #9ecde8 20%, #9ecde8 80%, transparent);
    margin: 16px 0;
  }
  .payment-info-left { padding-right: 0; }
}

/* Right side – QR code */
.payment-qr-side {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 22px;
  gap: 6px;
}
@media(max-width:640px) {
  .payment-qr-side {
    flex: 1 1 100%;
    padding-left: 0;
  }
}

.qr-label-top {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0077b6;
  font-weight: 700;
}

.qr-frame {
  background: #fff;
  border: 2px solid #9ecde8;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 3px 12px rgba(0,119,182,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
}

.qr-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

/* Fallback shown when qr-code.png not uploaded yet */
.qr-placeholder {
  font-size: 11px;
  color: #aaa;
  text-align: center;
  line-height: 1.5;
}
.qr-placeholder code {
  font-size: 10px;
  background: #f0f0f0;
  padding: 2px 4px;
  border-radius: 3px;
  color: #0077b6;
}

.qr-upi-label {
  font-size: 12px;
  color: #555;
  font-weight: 600;
  text-align: center;
}

.qr-amount-label {
  font-size: 18px;
  font-weight: 800;
  color: #0077b6;
  text-align: center;
}
