/* apps/web/src/features/paid-media/paid-media.css */
.marketing-center {
  max-width: 1600px;
  margin: auto;
  padding: 20px;
  color: #1e293b;
  text-align: right;
}
.marketing-center > header h1 {
  font-size: 22px;
  font-weight: 700;
}
.marketing-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e2e8f0;
  margin: 16px 0 22px;
}
.marketing-tabs button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding: 10px 2px 12px;
  color: #64748b;
  border-bottom: 2px solid transparent;
}
.marketing-tabs button[aria-selected=true] {
  color: #4338ca;
  border-color: #4f46e5;
  font-weight: 600;
}
.marketing-center .social-calendar {
  padding: 0;
}
.marketing-center .sc-header h2 {
  font-size: 16px;
  font-weight: 600;
}
.paid-media,
.pm-dialog {
  color: #1e293b;
  text-align: right;
  font-size: 13px;
}
.paid-media button,
.pm-dialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 8px 11px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}
.paid-media button:hover,
.pm-dialog button:hover {
  background: #f8fafc;
}
.paid-media button:disabled,
.pm-dialog button:disabled {
  opacity: .5;
  cursor: default;
}
.paid-media .pm-primary,
.pm-dialog .pm-primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.paid-media .pm-primary:hover,
.pm-dialog .pm-primary:hover {
  background: #4338ca;
}
.paid-media .pm-icon,
.pm-dialog .pm-icon {
  padding: 7px;
  border-color: transparent;
  background: transparent;
}
.paid-media :is(button, input, select):focus-visible,
.pm-dialog :is(button, input, select):focus-visible,
.marketing-tabs button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}
.pm-heading,
.pm-actions,
.pm-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pm-heading {
  margin-bottom: 20px;
}
.pm-heading h2 {
  font-size: 17px;
  font-weight: 650;
}
.pm-heading p {
  color: #64748b;
  margin-top: 4px;
  font-size: 12px;
}
.pm-actions {
  justify-content: flex-start;
  gap: 8px;
}
.pm-budget {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 22px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: white;
}
.pm-budget-total {
  min-width: 165px;
}
.pm-budget-total > span {
  font-size: 12px;
  color: #64748b;
}
.pm-budget-total > div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
}
.pm-budget-total strong {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -1px;
}
.pm-budget-total small,
.pm-budget-allocation > p {
  color: #64748b;
  font-size: 11px;
}
.pm-budget-allocation {
  flex: 1;
  max-width: 650px;
}
.pm-budget-bar {
  height: 6px;
  border-radius: 4px;
  display: flex;
  gap: 3px;
  background: #f1f5f9;
  overflow: hidden;
}
.pm-budget-bar span {
  min-width: 0;
}
.pm-registration {
  background: #6366f1;
}
.pm-leads {
  background: #38bdf8;
}
.pm-awareness {
  background: #cbd5e1;
}
.pm-budget-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 25px;
  margin: 15px 0 8px;
}
.pm-budget-legend > div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.pm-budget-legend b {
  font-weight: 600;
  margin-inline-start: 4px;
}
.pm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pm-status-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #64748b;
  padding: 12px 2px 22px;
}
.pm-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
}
.pm-list-heading {
  margin: 4px 0 12px;
}
.pm-list-heading h3 {
  font-size: 14px;
  font-weight: 600;
}
.pm-list-heading h3 span {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  margin-inline-start: 5px;
}
.pm-filter select {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
  color: #475569;
}
.paid-media .pm-selected {
  color: #4338ca;
  background: #eef2ff;
  border-color: #c7d2fe;
}
.pm-campaigns {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.paid-media button.pm-campaign {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 16px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #eef2f6;
  padding: 18px;
  text-align: right;
}
.paid-media button.pm-campaign:last-child {
  border-bottom: 0;
}
.pm-campaign-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.pm-campaign-mark.pm-registration {
  color: #4f46e5;
  background: #eef2ff;
}
.pm-campaign-mark.pm-leads {
  color: #0284c7;
  background: #f0f9ff;
}
.pm-campaign-mark.pm-awareness {
  color: #64748b;
  background: #f1f5f9;
}
.pm-campaign-name {
  flex: 1;
  min-width: 0;
}
.pm-campaign-name strong {
  display: block;
  font-weight: 600;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.pm-campaign-name small {
  display: block;
  color: #64748b;
  font-size: 11px;
  margin-top: 5px;
}
.pm-campaign-goal {
  width: 105px;
  color: #64748b;
  font-size: 11px;
}
.pm-campaign-budget {
  min-width: 90px;
  text-align: left;
}
.pm-campaign-budget b {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
.pm-campaign-budget small {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
}
.pm-campaign-status {
  width: 82px;
  text-align: center;
}
.pm-campaign-status > span {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 5px;
}
.pm-campaign-status small {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  color: #94a3b8;
  font-size: 10px;
  margin-top: 5px;
}
.pm-row-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}
.pm-empty,
.pm-start {
  text-align: center;
  padding: 44px 20px;
  border: 1px dashed #dce2ec;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
}
.pm-empty button {
  margin-top: 12px;
}
.pm-start h3 {
  font-size: 17px;
  font-weight: 600;
  color: #334155;
  margin: 12px 0 8px;
}
.pm-start p {
  line-height: 1.8;
  max-width: 430px;
  margin: 0 auto 20px;
}
.pm-start small {
  display: block;
  font-size: 11px;
  margin-top: 10px;
  color: #94a3b8;
}
.pm-start-icon {
  display: inline-flex;
  color: #6366f1;
  background: #eef2ff;
  padding: 10px;
  border-radius: 12px;
}
.pm-error,
.pm-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.pm-error {
  background: #fff1f2;
  color: #9f1239;
}
.pm-notice {
  background: #f0fdf4;
  color: #166534;
}
.pm-connections {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 16px;
}
.pm-connections > p {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 12px;
}
.pm-connections > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pm-connections section > * {
  display: block;
}
.pm-connections section strong {
  font-size: 12px;
  font-weight: 600;
}
.pm-connections section span,
.pm-connections section small {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}
.pm-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  width: min(520px, calc(100% - 28px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 22px 70px #0f172a26;
  background: #fff;
}
.pm-dialog::backdrop {
  background: #0f172a66;
  backdrop-filter: blur(2px);
}
.pm-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.pm-dialog h2 {
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.pm-form {
  padding: 20px;
}
.pm-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.pm-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 15px;
}
.pm-form :is(input:not([type=checkbox]), select) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #dce2ec;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
}
.pm-form :disabled {
  color: #64748b;
  background: #f8fafc;
}
.pm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.pm-form small,
.pm-help {
  font-size: 11px;
  color: #64748b;
  line-height: 1.7;
}
.pm-help {
  margin: -6px 0 15px;
}
.pm-form label.pm-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  line-height: 1.6;
}
.pm-checkbox input {
  accent-color: #4f46e5;
}
.pm-form footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  flex-wrap: wrap;
}
.pm-form footer .pm-archive-action {
  margin-inline-end: auto;
  color: #64748b;
}
.pm-media-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: #f1f5f9;
  margin-bottom: 18px;
  min-height: 80px;
}
.pm-media-preview video,
.pm-media-preview img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}
.pm-media-preview p {
  padding: 14px;
  color: #64748b;
  font-size: 12px;
}
@media (max-width: 700px) {
  .marketing-center {
    padding: 16px;
  }
  .pm-heading {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
  .pm-budget {
    gap: 20px;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .pm-budget-allocation {
    width: 100%;
  }
  .pm-budget-total > div {
    margin: 6px 0;
  }
  .pm-budget-legend {
    gap: 10px 16px;
  }
  .pm-budget-legend > div {
    font-size: 11px;
  }
  .paid-media button.pm-campaign {
    gap: 10px;
    padding: 15px 12px;
    flex-wrap: wrap;
  }
  .pm-campaign-name {
    flex-basis: calc(100% - 70px);
  }
  .pm-campaign-goal {
    width: auto;
    margin-inline-start: 42px;
    margin-inline-end: auto;
  }
  .pm-campaign-budget {
    min-width: 50px;
  }
  .pm-campaign-status {
    width: 62px;
  }
  .pm-row-arrow {
    display: none;
  }
  .pm-connections > div {
    grid-template-columns: 1fr;
  }
  .pm-list-heading {
    gap: 8px;
  }
  .pm-actions {
    gap: 5px;
  }
  .pm-list-heading .pm-actions button {
    padding: 7px;
  }
  .pm-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }
  .pm-form {
    padding: 16px;
  }
  .pm-form-grid {
    gap: 0 10px;
  }
  .pm-form footer .pm-archive-action {
    font-size: 11px;
    padding: 8px;
  }
  .pm-heading h2 {
    font-size: 16px;
  }
}
.pm-filter {
  min-width: 140px;
}
.pm-select-field {
  margin: 7px 0 20px;
}
.pm-select-field label {
  margin: 0;
}
.pm-media-field {
  margin: 4px 0 22px;
}
.pm-media-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pm-media-heading h3 {
  font-size: 13px;
  font-weight: 600;
}
.pm-media-heading > span {
  font-size: 11px;
  color: #64748b;
}
.pm-media-field > .pm-help {
  margin: 0 0 12px;
}
.pm-variants {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 10px;
}
.pm-variant {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-bottom: 1px solid #eef2f6;
}
.pm-variant:last-child {
  border-bottom: 0;
}
.pm-dialog .pm-variant-preview {
  border: 0;
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
  text-align: right;
  padding: 7px 3px;
}
.pm-variant-preview > span {
  min-width: 0;
}
.pm-variant-preview b,
.pm-variant-preview small {
  display: block;
}
.pm-variant-preview b {
  font-size: 12px;
  font-weight: 500;
}
.pm-variant-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}
.pm-dialog .pm-variant-preview[aria-pressed=true] {
  color: #4f46e5;
}
.pm-dialog .pm-select-field button,
.pm-dialog .pm-media-field > div > button {
  justify-content: space-between;
}
.pm-select-field label {
  pointer-events: none;
}
.pm-thumbnail {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 72px;
  width: 72px;
  height: 54px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  overflow: hidden;
  background: #f1f5f9;
  isolation: isolate;
}
.pm-thumbnail.pm-thumbnail-compact {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
}
.pm-thumbnail > img,
.pm-thumbnail > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
.pm-thumbnail > img.is-loaded,
.pm-thumbnail > video.is-loaded {
  opacity: 1;
}
.pm-thumbnail-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
}
.pm-thumbnail-play {
  position: absolute;
  bottom: 3px;
  inset-inline-end: 3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  background: #0f172ab3;
  color: #fff;
  border-radius: 50%;
  pointer-events: none;
}
.pm-dialog .pm-variant-preview {
  gap: 10px;
}
.pm-variant-label {
  flex: 1;
  overflow: hidden;
}
.pm-variant-label small {
  max-width: 100%;
}
@media (max-width: 700px) {
  .pm-thumbnail {
    flex-basis: 60px;
    width: 60px;
    height: 46px;
  }
  .pm-thumbnail.pm-thumbnail-compact {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }
}
.pm-creative-review {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}
.pm-creative-review summary {
  cursor: pointer;
  font-weight: 600;
}
.pm-creative-card {
  padding: 20px 0;
  border-bottom: 1px solid #e2e8f0;
}
.pm-creative-card h4 {
  margin: 0 0 10px;
}
.pm-creative-card small {
  color: #64748b;
}
.pm-creative-variant {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  overflow-wrap: anywhere;
}

/* apps/web/src/features/paid-media/paid-ad.css */
.pa-studio {
  margin-top: 22px;
}
.pa-studio-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
}
.pa-studio-head small,
.pa-studio-head p {
  color: #64748b;
}
.pa-studio-head h3 {
  font-size: 25px;
  margin: 6px 0;
}
.pa-studio-head h3 span {
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
}
.pa-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 18px 0;
}
.pa-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pa-filters button,
.pa-editor-tabs button,
.pa-preview-placements button {
  border: 1px solid #e2e8f0;
  background: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: #64748b;
}
.pa-filters button[aria-pressed=true],
.pa-editor-tabs button[aria-pressed=true],
.pa-preview-placements button[aria-pressed=true] {
  background: #152433;
  border-color: #152433;
  color: white;
}
.pa-toolbar > small {
  color: #64748b;
}
.pa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 20px;
}
.pa-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: white;
  overflow: hidden;
}
.pa-card-body {
  padding: 18px;
}
.pa-card-body > small {
  font-size: 11px;
  color: #64748b;
}
.pa-card h4 {
  margin: 10px 0;
  font-size: 17px;
}
.pa-status {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #a16207;
}
.pa-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eab308;
}
.pa-status.is-ready {
  color: #047857;
}
.pa-status.is-ready > span {
  background: #10b981;
}
.pa-card-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}
.pa-connection {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin: 24px 0;
}
.pa-connection div {
  flex: 1;
}
.pa-connection p {
  font-size: 13px;
  color: #64748b;
  margin: 5px 0;
}
.pa-connection small {
  color: #94a3b8;
  font-size: 11px;
}
.pa-import {
  padding: 18px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
}
.pa-import button {
  margin-inline-end: 10px;
}
.pa-preview {
  width: 100%;
}
.pa-preview-placements {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pa-ad-shell {
  border: 1px solid #dbe1e8;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  color: #12151b;
  max-width: 420px;
  margin: auto;
  direction: ltr;
}
.pa-ad-shell > header {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  font: 12px Arial, sans-serif;
}
.pa-ad-shell header div {
  display: grid;
  gap: 3px;
}
.pa-ad-shell header small {
  font-size: 10px;
  color: #64748b;
}
.pa-brand-mark {
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #fff1f2;
  color: #fb2935;
  font-weight: 700;
}
.pa-dots {
  margin-inline-start: auto;
  color: #64748b;
}
.pa-ad-copy {
  padding: 0 12px;
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 10px;
  white-space: pre-wrap;
}
.pa-ad-media {
  position: relative;
  background: #f8fafc;
  overflow: hidden;
  aspect-ratio: 4/5;
}
.pa-ad-media img,
.pa-ad-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pa-media-empty {
  height: 100%;
  min-height: 160px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #94a3b8;
  font-size: 12px;
}
.pa-ad-shell footer {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  direction: rtl;
}
.pa-ad-shell footer > div {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.pa-ad-shell footer small {
  font-size: 10px;
  color: #64748b;
  overflow-wrap: anywhere;
}
.pa-ad-shell footer b {
  font-size: 12px;
}
.pa-ad-shell footer span {
  font-size: 10px;
  color: #64748b;
}
.pa-ad-shell footer a,
.pa-ad-shell footer button {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #e7ebf0;
  border: 0;
  border-radius: 5px;
  color: #172334;
  text-decoration: none;
  white-space: nowrap;
  padding: 9px;
  font-size: 11px;
  font-weight: 600;
}
.pa-ad-shell.is-vertical {
  max-width: 320px;
  position: relative;
  background: #172334;
}
.pa-ad-shell.is-vertical > header {
  background: #172334;
  color: white;
}
.pa-ad-shell.is-vertical header small {
  color: #cbd5e1;
}
.pa-ad-shell.is-vertical .pa-ad-media {
  aspect-ratio: 9/16;
}
.pa-story-safe {
  position: absolute;
  pointer-events: none;
  inset: 14% 6% 35%;
  border: 1px dashed #fb7185;
  opacity: 0.6;
}
.pa-preview-note {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin: 12px 0;
  line-height: 1.6;
}
.pa-preview.is-compact {
  padding: 12px;
  background: #f1f5f9;
}
.pa-preview.is-compact .pa-ad-shell {
  border-radius: 9px;
}
.pa-preview.is-compact .pa-ad-copy {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  height: 38px;
}
.pa-preview.is-compact .pa-ad-media {
  height: 265px;
  aspect-ratio: auto;
}
.pa-preview.is-compact footer a {
  pointer-events: none;
}
.pa-ad-media.is-carousel {
  aspect-ratio: 1;
}
.pa-carousel-nav {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}
.pa-carousel-nav button {
  border: 0;
  background: #e2e8f0;
  border-radius: 50%;
  font-size: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
}
.pa-carousel-nav button[aria-pressed=true] {
  background: #152433;
  color: white;
}
.pa-dialog {
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  max-width: 1120px;
  width: calc(100vw - 40px);
  max-height: 92dvh;
  overflow: auto;
  color: #172334;
  background: #fff;
}
.pa-dialog::backdrop {
  background: #0f172a70;
  backdrop-filter: blur(4px);
}
.pa-dialog > header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}
.pa-dialog > header small {
  color: #64748b;
  font-size: 11px;
}
.pa-dialog h3 {
  margin: 5px 0;
}
.pa-editor-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
}
.pa-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 30px;
  padding: 8px 24px 24px;
}
.pa-editor-grid form {
  min-width: 0;
}
.pa-editor-grid fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  min-width: 0;
}
.pa-editor-grid label:not(.pa-placement-fields label) {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
}
.pa-editor-grid input:not([type=checkbox]):not([type=file]),
.pa-editor-grid textarea {
  width: 100%;
  border: 1px solid #dbe2eb;
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  background: #fff;
}
.pa-editor-grid input:focus,
.pa-editor-grid textarea:focus {
  border-color: #7c9dbd;
  box-shadow: 0 0 0 2px #dceaf6;
}
.pa-editor-grid textarea {
  resize: vertical;
}
.pa-editor-grid small {
  color: #64748b;
  line-height: 1.6;
  font-size: 11px;
}
.pa-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
}
.pa-placement-fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pa-placement-fields h4 {
  width: 100%;
  margin: 0;
}
.pa-placement-fields label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.pa-variant-editor {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 16px;
  margin-bottom: 12px;
}
.pa-variant-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.pa-upload {
  position: relative;
  display: flex !important;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border: 1px dashed #b7c5d6;
  border-radius: 7px;
  color: #50657e;
}
.pa-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.pa-review-check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  line-height: 1.7;
}
.pa-readiness {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  margin: 20px 0;
  background: #f8fafc;
  font-size: 12px;
}
.pa-readiness h4 {
  margin-top: 0;
}
.pa-readiness p,
.pa-readiness li {
  line-height: 1.8;
}
.pa-readiness button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 8px 0 8px 6px;
}
.pa-readiness small {
  display: block;
}
.pa-history {
  padding: 12px 24px 30px;
}
.pa-history p {
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
  font-size: 13px;
}
@media (max-width: 760px) {
  .pa-studio-head,
  .pa-toolbar,
  .pa-connection {
    align-items: flex-start;
    flex-direction: column;
  }
  .pa-editor-grid {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }
  .pa-editor-grid aside {
    grid-row: 1;
  }
  .pa-dialog {
    width: calc(100vw - 16px);
    max-height: 96dvh;
  }
  .pa-dialog > header {
    padding: 16px;
  }
  .pa-two {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pa-grid {
    grid-template-columns: 1fr;
  }
}
.pa-meta-fields {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.pa-meta-fields h4 {
  margin: 0;
}
.pa-meta-fields p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  color: #64748b;
}
.paid-media .pa-filters button[aria-pressed=true],
.pa-dialog .pa-editor-tabs button[aria-pressed=true],
.pa-dialog .pa-preview-placements button[aria-pressed=true] {
  background: #152433;
  border-color: #152433;
  color: #fff;
}
.pa-placement-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.pa-placement-presets button {
  padding: 8px 12px;
  border: 1px solid #d8cfe2;
  border-radius: 8px;
  background: #fff;
  color: #49315c;
  cursor: pointer;
}
.pa-placement-presets button:hover {
  background: #f4eff8;
}

/* Long campaign/media labels must stay inside the ad editor on narrow screens. */
.pa-editor-grid > *,
.pa-editor-grid fieldset > *,
.pa-two > *,
.pa-dialog > header > div {
  min-width: 0;
}
.pa-dialog > header small,
.pa-dialog h3 {
  overflow-wrap: anywhere;
}
.pa-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .pa-editor-grid,
  .pa-two {
    grid-template-columns: minmax(0, 1fr);
  }
}
