/* ── Physician Weekly Template – Frontend Shortcode v1.7.2 ──────
   All selectors scoped under .pwt-sc-wrap
─────────────────────────────────────────────────────────────── */

/* ── Wrap & Layout ───────────────────────────────────────────── */
.pwt-sc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #1a2332;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  padding: 0;
  overflow: hidden;
  margin: 20px 0 28px;
}

/* Fullscreen mode */
.pwt-sc-wrap:fullscreen,
.pwt-sc-wrap:-webkit-full-screen {
  border-radius: 0;
  overflow-y: auto;
  padding: 0;
}

/* ── Toolbar ─────────────────────────────────────────────────── */
.pwt-sc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #f8f9fb;
  border-bottom: 1px solid #e2e6ea;
  flex-wrap: wrap;
}

.pwt-sc-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
}

.pwt-sc-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pwt-sc-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1a2332 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* ── Filter ──────────────────────────────────────────────────── */
.pwt-sc-filter-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pwt-sc-filter-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #6b7a8d;
  white-space: nowrap;
}

.pwt-sc-filter-sel {
  padding: 5px 10px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  color: #1a2332;
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}

.pwt-sc-filter-sel:focus { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.1); }

/* ── Toolbar Buttons ─────────────────────────────────────────── */
.pwt-sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.pwt-sc-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1a2332;
}

.pwt-sc-btn-fullscreen:hover { border-color: #1d4ed8; color: #1d4ed8; background: #dbeafe; }
.pwt-sc-btn-download:hover   { border-color: #16a34a; color: #16a34a; background: #dcfce7; }

/* ── Grid wrapper ────────────────────────────────────────────── */
.pwt-sc-grid-wrap {
  overflow-x: auto;
  padding: 16px;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.pwt-sc-grid {
  display: grid;
  grid-template-columns: 48px repeat(5, minmax(130px, 1fr));
  gap: 6px;
  min-width: 720px;
}

/* ── Headers ─────────────────────────────────────────────────── */
.pwt-sc-corner { background: transparent; }

.pwt-sc-day-hdr {
  background: #1a2332;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  padding: 8px 6px;
  border-radius: 6px;
  letter-spacing: .3px;
}

.pwt-sc-half-lbl {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-radius: 5px;
  padding: 4px 0;
}

.pwt-sc-half-am { color: #b45309; background: #fef3c7; }
.pwt-sc-half-pm { color: #1d4ed8; background: #dbeafe; }

/* ── Session cells ───────────────────────────────────────────── */
.pwt-sc-cell {
  border-radius: 7px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 64px;
  transition: background .15s;
}

.pwt-sc-am { background: #fefce8; border: 1px solid #fde68a; }
.pwt-sc-pm { background: #eff6ff; border: 1px solid #bfdbfe; }

/* ── Location group labels ───────────────────────────────────── */
.pwt-sc-group { margin-bottom: 3px; }

.pwt-sc-group-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 1px 6px 1px 4px;
  border-radius: 3px 3px 0 0;
  display: inline-block;
  margin-bottom: 2px;
}

.pwt-sc-lt-endoscopy         { background: #dcfce7; color: #15803d; }
.pwt-sc-lt-clinic            { background: #ede9fe; color: #6d28d9; }
.pwt-sc-lt-inpatient-consults { background: #fee2e2; color: #b91c1c; }
.pwt-sc-lt-admin-time        { background: #f1f5f9; color: #475569; }

/* ── Provider blocks ─────────────────────────────────────────── */
.pwt-sc-block {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border-left: 3px solid transparent;
  border-radius: 0 5px 5px 0;
  padding: 4px 7px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  flex-wrap: wrap;
  font-size: 11px;
  transition: box-shadow .15s;
}

.pwt-sc-block:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }

.pwt-sc-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.pwt-sc-pname {
  font-weight: 600;
  flex: 1;
  min-width: 50px;
}

.pwt-sc-cred {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .3px;
  flex-shrink: 0;
}

.pwt-sc-cred-physician { background: #dbeafe; color: #1d4ed8; }
.pwt-sc-cred-app       { background: #fee2e2; color: #b91c1c; }

.pwt-sc-loc {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.pwt-sc-note-icon {
  cursor: pointer;
  font-size: 10px;
  opacity: .7;
  flex-shrink: 0;
  transition: opacity .15s;
}
.pwt-sc-note-icon:hover { opacity: 1; }

/* ── Session note ─────────────────────────────────────────────── */
.pwt-sc-session-note {
  font-size: 11px;
  color: #6b7a8d;
  font-style: italic;
  border-top: 1px dashed #d1d5db;
  padding-top: 4px;
  margin-top: 2px;
  white-space: pre-wrap;
}

/* ── Tooltip ──────────────────────────────────────────────────── */
.pwt-sc-tooltip {
  position: absolute;
  z-index: 999999;
  max-width: 220px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Password gate ───────────────────────────────────────────── */
.pwt-sc-gate { margin: 20px 0 28px; }
.pwt-sc-gate-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: 360px; margin: 0 auto; padding: 32px 28px;
  background: #fff; border: 1px solid #e2e6ea; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.07); text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.pwt-sc-gate-icon  { font-size: 36px; line-height: 1; }
.pwt-sc-gate-title { font-size: 16px; font-weight: 700; color: #1a2332; margin: 0; }
.pwt-sc-gate-msg   { font-size: 13px; color: #6b7a8d; margin: 0; }
.pwt-sc-gate-form  { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.pwt-sc-gate-input {
  flex: 1; padding: 9px 12px; border: 1px solid #c9d0d8; border-radius: 6px;
  font-size: 13px; font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.pwt-sc-gate-input:focus { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.pwt-sc-gate-btn {
  padding: 9px 18px; background: #1d4ed8; color: #fff; border: none; border-radius: 6px;
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: opacity .15s; white-space: nowrap;
}
.pwt-sc-gate-btn:hover   { opacity: .88; }
.pwt-sc-gate-btn:disabled { opacity: .5; cursor: default; }
.pwt-sc-gate-error {
  font-size: 12px; color: #b91c1c; background: #fee2e2;
  border-radius: 5px; padding: 6px 12px; width: 100%;
}

/* ── Error ───────────────────────────────────────────────────── */
.pwt-sc-error { color: #b91c1c; font-size: 13px; font-style: italic; padding: 8px 0; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .pwt-sc-grid { grid-template-columns: 38px repeat(5, minmax(100px, 1fr)); min-width: 580px; }
  .pwt-sc-toolbar { padding: 10px 12px; }
  .pwt-sc-grid-wrap { padding: 10px; }
  .pwt-sc-title { font-size: 14px !important; }
}
