/* WizardSquare v3.2 (scoped) */
#wizard-square .fig-img{width:200px;height:200px;object-fit:contain;}
#figure-form{flex-direction:column} @media(min-width:768px){#figure-form{flex-direction:row}}
.fig-table td{border:none;padding:2px 4px;vertical-align:middle}
.fig-table .name-input{width:120px;max-width:100%;font-size:.8rem;padding:2px 4px}
.fig-table .area{white-space:nowrap;font-size:.85rem}
.fig-table .del{background:#dc3545;color:#fff;border:none;padding:2px 6px;font-size:.75rem;border-radius:3px;cursor:pointer}
#fig-total{border-top:1px solid #000;padding-top:2px;font-size:.9rem}
#tileModal.modal.show{display:block}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1050}
#tileModal .card{width:138px}#tileModal .card img{height:90px;object-fit:cover}
#tileModal .card-title{font-size:.75rem;line-height:1rem;min-height:26px;margin-bottom:2px}
#wizard-square .tile-photo{width:120px;height:120px;object-fit:cover;border:1px solid #ccc;border-radius:4px}


/* ===== v3.0 modern dark theme ===== */
#wizard-square #figure-block,
#wizard-square #fig-list-block,
#wizard-square #tile-summary {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 14px !important;
  padding: 18px !important;
}
#wizard-square h6 { color: #f1f1f1; font-weight: 600; }
#wizard-square .form-label { color: rgba(255,255,255,0.85); }

/* поля ввода / селекты — менее контрастный фон вместо белого */
#wizard-square .form-select,
#wizard-square .form-control,
#tileModal .form-select,
#tileModal .form-control {
  background-color: rgba(255,255,255,0.07);
  color: #f1f1f1;
  border: 1px solid rgba(255,255,255,0.18);
}
#wizard-square .form-select:focus,
#wizard-square .form-control:focus,
#tileModal .form-select:focus,
#tileModal .form-control:focus {
  background-color: rgba(255,255,255,0.10);
  color: #fff;
  border-color: #6f8cff;
  box-shadow: 0 0 0 .2rem rgba(111,140,255,.25);
}
#wizard-square .form-select option,
#tileModal .form-select option { color: #111; }

#wizard-square .btn { border-radius: 8px; }
#wizard-square .fig-table .name-input {
  background: rgba(255,255,255,0.07);
  color: #f1f1f1;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
}
#wizard-square #fig-total { border-top-color: rgba(255,255,255,0.2); }

/* модалка выбора плитки — тёмная */
#tileModal .modal-content {
  background: #1f2024;
  color: #f1f1f1;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
}
#tileModal .modal-header { border-bottom: 1px solid rgba(255,255,255,0.12); }
#tileModal .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* карточки плитки */
#tileModal .card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #f1f1f1;
  border-radius: 10px;
  overflow: hidden;
}
#tileModal .card .card-title { color: #fff; }
#tileModal .card img { background: #fff; }

/* выбранная плитка */
#wizard-square #tile-summary .tile-photo { border-color: rgba(255,255,255,0.25); }
#wizard-square #tile-summary a#tile-name { color: #8fb0ff !important; }

#tileModal select option:disabled { color: #999; }

/* видимый текст подсказок и спиннер загрузки на тёмной модалке */
#tileModal .text-muted { color: #c2c6cc !important; }
#tileModal .ws-loading { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:28px 10px; color:#e8e8e8; font-size:.95rem; }
#tileModal .ws-spinner { width:26px; height:26px; border:3px solid rgba(255,255,255,0.25); border-top-color:#6f8cff; border-radius:50%; animation: wsspin .8s linear infinite; flex:none; }
@keyframes wsspin { to { transform: rotate(360deg); } }
