/* =======================================
   BTN MODAL BASE
======================================= */

.btn-modal-root {
  display: none;
}

.btn-modal-root.is-open {
  display: block;
}

.btn-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
}

.btn-modal-shell {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 520px;
  max-width: calc(100vw - 40px);
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
  z-index: 9999;
  font-family: Arial, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* =======================================
   MODAL SIZES
======================================= */

.btn-modal-shell.btn-modal-small {
  width: 450px;
}

.btn-modal-shell.btn-modal-medium {
  width: 700px;
}

.btn-modal-shell.btn-modal-large {
  width: 95%;
  max-width: 1100px;
}

.btn-modal-header {
  position: relative;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e5e5;
}

.btn-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #222;
}

.btn-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #777;
}

.btn-modal-body {
  padding: 20px 22px;
  font-size: 15px;
  color: #333;
  overflow-y: auto;
  flex: 1 1 auto;
}

.btn-modal-message {
  margin-bottom: 12px;
  line-height: 1.45;
}

.btn-modal-footer {
  padding: 16px 22px;
  border-top: 1px solid #e5e5e5;
  text-align: right;
  background: #fafafa;
}

.btn-modal-btn {
  padding: 8px 15px;
  border-radius: 5px;
  border: 1px solid #bbb;
  background: #f5f5f5;
  cursor: pointer;
  margin-left: 8px;
  font-size: 14px;
}

.btn-modal-primary {
  background: #2c7be5;
  border-color: #2c7be5;
  color: #fff;
}

.btn-modal-primary:hover {
  background: #1f68c7;
}

.btn-modal-secondary:hover {
  background: #e9e9e9;
}

.btn-modal-field {
  margin-bottom: 14px;
}

.btn-modal-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.btn-modal-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 5px;
  font-size: 14px;
}

.btn-modal-error {
  display: none;
  color: #b00020;
  padding: 0 22px 12px 22px;
  font-size: 14px;
}

body.btn-modal-open {
  overflow: hidden;
}

.program-box .program-subtitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin: 12px 0 8px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.program-box .program-section:first-of-type .program-subtitle {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.program-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  margin: 6px 0 8px;
}

.program-logo {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  object-fit: contain;
  display: block;
}

.program-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f2f4f;
  line-height: 1.25;
}

.program-box .empty-panel,
.program-box .muted {
  font-size: 13px;
  color: #64748b;
}

/* PROGRAMS PANEL FIX */
.side-stack [data-bind="programs-pc"] .program-row,
.side-stack [data-bind="programs-sp"] .program-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 6px 0 8px !important;
}

.side-stack [data-bind="programs-pc"] .program-logo,
.side-stack [data-bind="programs-sp"] .program-logo {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  object-fit: contain !important;
  flex: 0 0 30px !important;
}

.side-stack [data-bind="programs-pc"] .program-name,
.side-stack [data-bind="programs-sp"] .program-name {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #0f2f4f !important;
  line-height: 1.25 !important;
}

/* Subheaders */
.program-box .program-subtitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin: 10px 0 6px;
}