.cvma-pr-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
}

.cvma-pr-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.cvma-pr-header h2 {
  margin: 0 0 6px;
}

.cvma-pr-header p {
  margin: 0;
  opacity: 0.8;
}

.cvma-pr-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.cvma-pr-tab {
  border: 0;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  background: #f1f1f1;
  border-radius: 8px 8px 0 0;
}

.cvma-pr-tab.is-active {
  background: #111;
  color: #fff;
}

.cvma-pr-panel {
  display: none;
}

.cvma-pr-panel.is-active {
  display: block;
}

.cvma-pr-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.cvma-pr-card h3 {
  margin-top: 0;
}

.cvma-pr-form label,
.cvma-pr-label {
  display: block;
  font-weight: 700;
  margin-bottom: 16px;
}

.cvma-pr-form label span,
.cvma-pr-label {
  display: block;
  margin-bottom: 6px;
}

.cvma-pr-form input[type='text'],
.cvma-pr-form input[type='date'],
.cvma-pr-form input[type='time'],
.cvma-pr-form input[type='url'],
.cvma-pr-form textarea,
.cvma-pr-form select {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  background: #fff;
}

.cvma-pr-form textarea {
  resize: vertical;
}


.cvma-pr-editor-field {
  margin-bottom: 16px;
}

.cvma-pr-editor-field .wp-editor-wrap {
  max-width: 100%;
}

.cvma-pr-editor-field .wp-editor-container {
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.cvma-pr-editor-field .mce-toolbar-grp,
.cvma-pr-editor-field .quicktags-toolbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.cvma-pr-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cvma-pr-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 6px 0 18px;
}

.cvma-pr-checkbox span {
  margin: 0 !important;
}

.cvma-pr-image-picker {
  margin: 18px 0;
}

.cvma-pr-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  max-width: 320px;
  border: 1px dashed rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  background: #f8f8f8;
  margin-bottom: 10px;
  overflow: hidden;
}

.cvma-pr-image-preview img {
  max-width: 100%;
  height: auto;
  display: block;
}

.cvma-pr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cvma-pr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none !important;
  font-weight: 700;
  line-height: 1.2;
}

.cvma-pr-button.primary {
  background: #111;
  color: #fff;
}

.cvma-pr-button.secondary {
  background: #e8e8e8;
  color: #111;
}

.cvma-pr-button.light {
  background: #fff;
  color: #111;
  border-color: rgba(0, 0, 0, 0.2);
}

.cvma-pr-notice {
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0;
  font-weight: 700;
}

.cvma-pr-success {
  background: #e7f7ec;
  color: #145c2e;
  border: 1px solid #b8e3c4;
}

.cvma-pr-error {
  background: #fdeaea;
  color: #8a1f1f;
  border: 1px solid #f2baba;
}

.cvma-pr-table-wrap {
  overflow-x: auto;
}

.cvma-pr-table {
  width: 100%;
  border-collapse: collapse;
}

.cvma-pr-table th,
.cvma-pr-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cvma-pr-table th {
  font-weight: 800;
}

@media (max-width: 720px) {
  
.cvma-pr-editor-field {
  margin-bottom: 16px;
}

.cvma-pr-editor-field .wp-editor-wrap {
  max-width: 100%;
}

.cvma-pr-editor-field .wp-editor-container {
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.cvma-pr-editor-field .mce-toolbar-grp,
.cvma-pr-editor-field .quicktags-toolbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.cvma-pr-grid-two {
    grid-template-columns: 1fr;
  }

  .cvma-pr-tabs {
    flex-direction: column;
    border-bottom: 0;
  }

  .cvma-pr-tab {
    border-radius: 8px;
  }
}

.cvma-pr-table-image {
  width: 78px;
}

.cvma-pr-table-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.cvma-pr-no-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: #f0f0f0;
  font-size: 12px;
  text-align: center;
  color: #555;
}

.cvma-pr-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cvma-pr-status-publish {
  background: #e7f7ec;
  color: #145c2e;
}

.cvma-pr-status-draft {
  background: #f0f0f0;
  color: #444;
}

.cvma-pr-status-pending {
  background: #fff4d6;
  color: #7a5200;
}

.cvma-pr-row-actions {
  white-space: nowrap;
}

.cvma-pr-row-actions a + a {
  margin-left: 10px;
}

.cvma-pr-grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cvma-pr-subsection {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  background: #fafafa;
}

.cvma-pr-help {
  display: block;
  margin-top: 6px;
  font-weight: 500;
  opacity: 0.75;
  line-height: 1.35;
}

.cvma-pr-help.strong {
  font-weight: 700;
  opacity: 0.9;
  margin: 0 0 14px;
}


.cvma-pr-image-recommendation {
  opacity: 0.95;
  font-weight: 800;
  color: #222;
}

.cvma-pr-new-venue-fields[hidden] {
  display: none !important;
}

.cvma-pr-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cvma-pr-image-name {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cvma-pr-empty-image {
  font-weight: 700;
  opacity: 0.7;
}

.cvma-pr-image-preview {
  flex-direction: column;
}

.cvma-pr-notice-title {
  margin-bottom: 8px;
}

.cvma-pr-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cvma-pr-button.mini {
  padding: 7px 11px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .cvma-pr-grid-three {
    grid-template-columns: 1fr;
  }

  .cvma-pr-image-actions,
  .cvma-pr-notice-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.cvma-pr-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.cvma-pr-card-heading h3 {
  margin-bottom: 4px;
}

.cvma-pr-muted {
  margin: 0;
  opacity: 0.72;
  font-size: 14px;
}

.cvma-pr-count {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f1f1f1;
  font-size: 12px;
  font-weight: 800;
}

.cvma-pr-table-tools {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 14px;
}

.cvma-pr-search-label {
  width: min(420px, 100%);
  font-weight: 800;
}

.cvma-pr-search-label span {
  display: block;
  margin-bottom: 6px;
}

.cvma-pr-table-search {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
}

.cvma-pr-sort {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 24px !important;
}

.cvma-pr-sort::after {
  content: '↕';
  position: absolute;
  right: 8px;
  opacity: 0.45;
}

.cvma-pr-sort[data-sort-direction='asc']::after {
  content: '↑';
  opacity: 0.9;
}

.cvma-pr-sort[data-sort-direction='desc']::after {
  content: '↓';
  opacity: 0.9;
}

.cvma-pr-no-results {
  padding: 12px;
  background: #f8f8f8;
  border-radius: 8px;
  font-weight: 700;
}

.cvma-pr-quality-box {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
  background: #fafafa;
}

.cvma-pr-quality-box.is-good {
  background: #e7f7ec;
  border-color: #b8e3c4;
}

.cvma-pr-quality-box.is-warning {
  background: #fff4d6;
  border-color: #f1d48a;
}

.cvma-pr-quality-title {
  font-weight: 900;
  margin-bottom: 6px;
}

.cvma-pr-quality-list {
  margin: 0 0 4px 20px;
  padding: 0;
}

.cvma-pr-quality-list li {
  margin: 4px 0;
}

.cvma-pr-status-future {
  background: #e8efff;
  color: #203d83;
}

@media (max-width: 720px) {
  .cvma-pr-header,
  .cvma-pr-card-heading,
  .cvma-pr-table-tools {
    flex-direction: column;
    align-items: stretch;
  }
}

.cvma-pr-view-modes {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cvma-pr-view-modes span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-right: 2px;
}

.cvma-pr-view-mode {
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #fff;
  color: #111;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cvma-pr-view-mode.is-active {
  background: #111;
  color: #fff;
}

.cvma-pr-dashboard.is-view-tablet {
  max-width: 820px;
}

.cvma-pr-dashboard.is-view-mobile {
  max-width: 430px;
}

.cvma-pr-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.cvma-pr-image-info {
  margin-top: 10px;
}

.cvma-pr-image-info[hidden] {
  display: none !important;
}

.cvma-pr-image-info-inner {
  display: grid;
  gap: 8px;
}

.cvma-pr-image-info-row {
  border-radius: 8px;
  padding: 9px 10px;
  background: #f4f4f4;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.cvma-pr-image-info-row.good {
  background: #e7f7ec;
  color: #145c2e;
  border-color: #b8e3c4;
}

.cvma-pr-image-info-row.warning {
  background: #fff4d6;
  color: #664300;
  border-color: #f1d48a;
}

.cvma-pr-image-info-row ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.cvma-pr-image-info-row li {
  margin: 3px 0;
}

.cvma-pr-image-info-row li span {
  opacity: 0.75;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-header,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-header,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-card-heading,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-card-heading,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-table-tools,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table-tools,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-heading-actions,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-heading-actions {
  flex-direction: column;
  align-items: stretch;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-grid-two,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-grid-two,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-grid-three,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-grid-three {
  grid-template-columns: 1fr;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-tabs,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-tabs {
  overflow-x: auto;
  padding-bottom: 4px;
}

.cvma-pr-dashboard.is-view-mobile .cvma-pr-card {
  padding: 16px;
  border-radius: 10px;
}

.cvma-pr-dashboard.is-view-mobile .cvma-pr-actions,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-image-actions,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-notice-actions {
  flex-direction: column;
  align-items: stretch;
}

.cvma-pr-dashboard.is-view-mobile .cvma-pr-button,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-tab {
  width: 100%;
}

@media (max-width: 900px) {
  .cvma-pr-dashboard {
    padding: 16px 0;
  }

  .cvma-pr-header,
  .cvma-pr-card-heading,
  .cvma-pr-table-tools,
  .cvma-pr-heading-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cvma-pr-view-modes {
    justify-content: flex-start;
  }

  .cvma-pr-tabs {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .cvma-pr-grid-two,
  .cvma-pr-grid-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .cvma-pr-card {
    padding: 16px;
  }

  .cvma-pr-actions,
  .cvma-pr-image-actions,
  .cvma-pr-notice-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cvma-pr-button,
  .cvma-pr-tab {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .cvma-pr-table-wrap {
    overflow: visible;
  }

  .cvma-pr-table,
  .cvma-pr-table thead,
  .cvma-pr-table tbody,
  .cvma-pr-table th,
  .cvma-pr-table td,
  .cvma-pr-table tr {
    display: block;
  }

  .cvma-pr-table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  .cvma-pr-table tbody tr {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 12px;
    padding: 10px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  }

  .cvma-pr-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border: 0 !important;
    padding: 8px 0 !important;
    text-align: right;
  }

  .cvma-pr-table td::before {
    content: attr(data-label);
    font-weight: 900;
    text-align: left;
    color: #111;
    min-width: 110px;
    max-width: 42%;
  }

  .cvma-pr-table td.cvma-pr-table-image {
    justify-content: flex-start;
    text-align: left;
  }

  .cvma-pr-table td.cvma-pr-table-image::before {
    padding-top: 8px;
  }

  .cvma-pr-table .cvma-pr-row-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-table-wrap,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table-wrap {
  overflow: visible;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-table,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-table thead,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-table tbody,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-table th,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-table td,
.cvma-pr-dashboard.is-view-tablet .cvma-pr-table tr,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table thead,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table tbody,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table th,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table td,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table tr {
  display: block;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-table thead,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table thead {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-table tbody tr,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table tbody tr {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  padding: 10px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-table td,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table td {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 0 !important;
  padding: 8px 0 !important;
  text-align: right;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-table td::before,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table td::before {
  content: attr(data-label);
  font-weight: 900;
  text-align: left;
  color: #111;
  min-width: 110px;
  max-width: 42%;
}

.cvma-pr-dashboard.is-view-tablet .cvma-pr-table .cvma-pr-row-actions,
.cvma-pr-dashboard.is-view-mobile .cvma-pr-table .cvma-pr-row-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}


/* Mobile/tablet cleanup for the WordPress Media Library modal opened from this dashboard.
   WordPress's default media modal can collapse into a skinny one-image column on phones,
   so this makes the image grid more thumb-friendly without changing the saved image behavior. */
body.cvma-pr-media-modal-open .media-modal {
  max-width: 96vw;
}

@media (max-width: 900px) {
  body.cvma-pr-media-modal-open .media-modal {
    top: 18px;
    right: 10px;
    bottom: 18px;
    left: 10px;
  }

  body.cvma-pr-media-modal-open .media-modal-content {
    overflow: hidden;
  }

  body.cvma-pr-media-modal-open .media-frame-title,
  body.cvma-pr-media-modal-open .media-frame-router,
  body.cvma-pr-media-modal-open .media-frame-content,
  body.cvma-pr-media-modal-open .media-frame-toolbar {
    left: 0;
    right: 0;
  }

  body.cvma-pr-media-modal-open .attachments-browser .media-toolbar {
    right: 0;
    height: auto;
    min-height: 56px;
  }

  body.cvma-pr-media-modal-open .attachments-browser .attachments-wrapper,
  body.cvma-pr-media-modal-open .attachments-browser .attachments {
    right: 0 !important;
  }

  body.cvma-pr-media-modal-open .attachments-browser .media-sidebar,
  body.cvma-pr-media-modal-open .media-sidebar {
    display: none !important;
  }

  body.cvma-pr-media-modal-open .attachments .attachment {
    width: 25% !important;
  }

  body.cvma-pr-media-modal-open .attachments .attachment-preview {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.cvma-pr-media-modal-open .media-modal {
    top: 8px;
    right: 6px;
    bottom: 8px;
    left: 6px;
  }

  body.cvma-pr-media-modal-open .media-frame-title h1 {
    font-size: 18px;
  }

  body.cvma-pr-media-modal-open .media-frame-router {
    top: 46px;
  }

  body.cvma-pr-media-modal-open .media-frame-content {
    top: 86px;
    bottom: 64px;
  }

  body.cvma-pr-media-modal-open .attachments-browser .attachments {
    padding: 8px !important;
  }

  body.cvma-pr-media-modal-open .attachments .attachment {
    width: 33.3333% !important;
    padding: 4px !important;
  }

  body.cvma-pr-media-modal-open .attachments .attachment .thumbnail {
    border-radius: 8px;
    overflow: hidden;
  }

  body.cvma-pr-media-modal-open .media-frame-toolbar .media-toolbar {
    left: 0;
    right: 0;
    padding: 8px;
  }

  body.cvma-pr-media-modal-open .media-frame-toolbar .media-button {
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  body.cvma-pr-media-modal-open .attachments .attachment {
    width: 50% !important;
  }
}
