.banner-format {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.banner-format legend { margin-bottom: 8px; font-weight: 650; }
.format-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #edf4f9;
  max-width: 360px;
}
.format-options label.format-option, #ad-artwork .format-options label {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.format-option input[type=radio] {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.format-option span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 10px;
  color: #46647b;
  font-weight: 600;
}
.format-option svg { width: 19px; height: 19px; }
.format-option input:checked + span { background: #126b9e; color: white; }
.format-option input:focus-visible + span { outline: 2px solid #1248a1; outline-offset: 2px; }
#ad-preview-banner.side-preview {
  width: 120px;
  height: 450px;
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
  overflow: hidden;
}
#ad-preview-banner:has(img:not([hidden])) { display:block; overflow:hidden; padding:0; }
#ad-preview-banner img { display:block; width:100%; height:auto; }
#ad-preview-banner img[hidden] { display:none; }

/* Profile advertising workspace */
.ad-studio-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:24px; }
.placement-picker { display:grid; grid-column:1/-1; gap:8px; font-weight:650; min-width:0; }
.placement-picker select { display:block; width:100%; min-width:0; padding:11px 8px; min-height:48px; border:1px solid #a9ccde; border-radius:12px; color:#164660; background:#f5fbff; font:inherit; cursor:pointer; }
.preview-devices { display:flex; gap:4px; padding:3px; background:#deedf6; border-radius:10px; margin-bottom:12px; }
.preview-devices button { flex:1; min-height:38px; border:0; border-radius:8px; background:transparent; color:#34556a; font-weight:600; }
.preview-devices button[aria-pressed=true] { background:white; color:#085e87; box-shadow:0 1px 4px #16466024; }
#device-stage { width:100%; margin:auto; background:white; border:1px solid #b5cede; border-top:8px solid #b5cede; gap:9px; min-height:110px; }
#device-stage[data-device=mobile] { width:min(100%,200px); min-height:160px; border:3px solid #b5cede; border-radius:16px; align-content:start; }
.page-outline { display:grid; gap:4px; }
.page-outline i { display:block; height:6px; width:65%; background:#dce9f0; border-radius:4px; }
.page-outline i + i { width:40%; }
#device-stage[data-place=channel] .page-outline { padding:10px; background:#eaf5fb; }
#device-stage[data-place=catalog] .page-outline { padding:7px; border:1px solid #dce9f0; border-radius:7px; }
#device-stage[data-place=right][data-device=desktop] { grid-template-columns:minmax(0,1fr) auto; align-items:start; }
#device-stage[data-place=right][data-device=desktop] .side-preview { width:48px; height:180px; }
#device-stage[data-place=right][data-device=desktop] .side-preview strong { font-size:.6rem; }
.profile-ad-preview #device-empty { font-size:.82rem; margin:8px 0; }
.ad-studio-heading #profile-ad-title { font-size:clamp(1.45rem,3vw,2rem); letter-spacing:-.035em; line-height:1.12; }
#profile .ad-studio-heading #ad-order-history { margin:0; background:#f4faff; padding:9px 14px; }
.profile-ad #ad-draft-form { max-width:none; display:grid; gap:24px; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); align-items:start; }
.profile-ad .profile-ad-placements { grid-column:1/-1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.profile-ad .profile-ad-placements legend { margin-bottom:12px; font-size:1rem; }
.profile-ad-placements label.ad-location { position:relative; display:grid; align-content:start; justify-items:start; gap:3px; min-width:0; padding:12px; background:#fff; border:1px solid #cfdfeb; border-radius:13px; }
.ad-location input { position:absolute; right:10px; top:10px; width:16px; height:16px; }
.profile-ad-placements label.ad-location:has(:checked) { background:#edf8ff; border-color:#197cab; box-shadow:inset 0 0 0 1px #197cab; }
.ad-location:has(:focus-visible) { outline:3px solid #175ea0; outline-offset:2px; }
.slot-name { font-weight:700; line-height:1.2; }
.ad-location small { font-size:.76rem; color:#4a6479; }
.ad-location .placement-price { margin:6px 0 0; color:#0a658e; font-size:.9rem; }
.slot-map { display:block; position:relative; width:55px; height:36px; margin:1px 0 7px; border:1px solid #8bb1c8; border-radius:5px; background:linear-gradient(#d7e6f0 5px,#fff 5px); }
.slot-map i,.slot-map b { position:absolute; left:5px; right:5px; height:5px; border-radius:2px; }
.slot-map i { top:10px; background:#cadde9; box-shadow:0 8px #cadde9; }
.slot-map b { bottom:4px; background:#1388be; }
.map-catalog b { bottom:12px; }
.map-channel i { height:9px; box-shadow:none; }
.map-channel b { bottom:8px; }
.map-right i { right:17px; }
.map-right b { left:auto; width:7px; top:9px; height:auto; }
.ad-edit-pane,.ad-review-pane { min-width:0; display:grid; gap:16px; }
.ad-edit-pane h3,.ad-review-pane h3 { margin:0; font-size:1.1rem; }
.ad-edit-pane #ad-artwork:empty { display:none; }
.ad-edit-pane .profile-ad-field input { min-height:46px; padding-inline:12px; border-radius:10px; }
.ad-edit-pane .profile-ad-swatches { display:flex; flex-wrap:wrap; gap:8px; }
.ad-edit-pane .profile-ad-swatches label { min-height:36px; width:36px; border-radius:50%; }
.ad-review-pane { position:sticky; top:16px; padding:18px; background:#f2f8fc; border-radius:15px; border:1px solid #d7e7f1; }
.ad-review-pane .profile-ad-preview p { margin-bottom:8px; font-size:.88rem; }
.ad-stage { display:grid; align-items:center; min-height:110px; padding:12px; border-radius:10px; background-color:#fff; background-image:radial-gradient(#d0e2ed 1px,transparent 1px); background-size:8px 8px; }
.ad-stage #ad-preview-banner { min-width:0; width:100%; }
.ad-stage #ad-preview-banner.side-preview { width:80px; height:300px; padding:4px; }
.ad-stage #ad-preview-banner.side-preview:has(img:not([hidden])) { padding:0; }
.ad-stage #ad-preview-banner.side-preview strong { font-size:.84rem; }
.ad-checkout-total { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding-top:14px; border-top:1px solid #d0e1ed; }
.ad-checkout-total strong { font-size:1.4rem; color:#154862; font-variant-numeric:tabular-nums; }
.ad-review-pane .profile-ad-terms { padding:0; background:transparent; color:#455e70; line-height:1.45; }
.ad-review-pane .profile-ad-pay { width:100%; min-height:46px; background:#08658e; color:#fff; border:0; border-radius:11px; font-weight:700; }
#ad-payment-dialog { border-radius:20px; }
#ad-payment-dialog .ad-payment-inner { padding:clamp(16px,4vw,28px); }
#ad-payment-dialog .ad-pay-facts { background:#eaf6fd; padding:16px; border-radius:12px; }
@media(max-width:1050px) {
  .profile-ad #ad-draft-form { grid-template-columns:minmax(0,1fr); }
  .ad-review-pane { position:static; }
}
@media(max-width:650px) {
  .profile-ad .profile-ad-placements { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ad-studio-heading { margin-bottom:18px; }
  .ad-review-pane { padding:14px; }
}
