/* Use the same workspace bounds and controls as the other cabinet pages. */
.main:has(> #page-campaigns:not(.hidden)) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
#page-campaigns {
  display: flex;
  flex: 1;
  min-width: 0;
}
#page-campaigns > .panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-bottom: 0;
}
#page-campaigns .table-scroll { flex: 1; }
#campaignList .data-table { min-width: 480px; }
#campaignList th:first-child { width: 75px; }
#campaignList th:nth-child(3) { width: 150px; }
#page-campaigns .data-table th:last-child,
#page-campaigns .data-table td:last-child:not([colspan]) {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
#page-campaigns .row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
#campaignList .campaign-open {
  display: block;
  margin: 0 0 10px;
  padding: 0;
}
#campaignList .row-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}
#campaignList .data-table th:last-child,
#campaignList .data-table td:last-child:not([colspan]) {
  width: 150px;
  text-align: left;
}
body[data-theme="oneprofit"] #page-campaigns thead { background: #f8f9fc; }
@media (max-width: 760px) {
  #page-campaigns .advertising-toolbar h2 { order: -1; }
}

.advertising-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 24px; }
.advertising-toolbar h2 { margin: 0 auto 0 0; min-width: 0; overflow-wrap: anywhere; font-size: 20px; }
.advertising-toolbar .control { flex: 0 1 260px; }
.campaign-open { border: 0; padding: 8px 0; background: transparent; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
body[data-theme="oneprofit"] .campaign-open { color: #1437b5; }
.advertising-empty { padding: 45px 20px !important; text-align: center; color: var(--muted); }
.advertising-title { min-width: 210px; max-width: 380px; overflow-wrap: anywhere; }
.advertising-url { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5370a5; }
.advertising-table .thumbnail { width: 112px; height: 72px; object-fit: cover; border-radius: 4px; }
.advertising-dialog .cform-cols { flex-direction: column; }
.advertising-dialog .dialog-content { max-height: 65vh; overflow-y: auto; }
.advertising-campaign-label { margin: 0 0 20px; color: var(--muted); overflow-wrap: anywhere; }
.campaign-fields:empty { display: none; }
@media (max-width: 760px) {
  .advertising-toolbar { gap: 12px; }
  .advertising-toolbar h2 { flex-basis: 100%; font-size: 18px; }
  .advertising-toolbar .control { flex: 1 1 100%; }
  .advertising-url { max-width: 220px; }
}

#campaignDialog { width: 840px; }
#campaignDialog .dialog-head { padding: 24px 28px; }
#campaignDialog .dialog-head h2 { font-size: 23px; }
#campaignDialog .dialog-content { padding: 22px 28px; }
#campaignDialog .dialog-foot { padding: 18px 28px; }
#campaignDialog .campaign-fields > .field { margin-top: 18px; }
@media (max-width: 600px) {
  #campaignDialog .dialog-head, #campaignDialog .dialog-content, #campaignDialog .dialog-foot { padding: 18px; }
  #campaignDialog .dialog-head h2 { font-size: 19px; }
}
