/* Requirement 25: status buttons keep each template's native page layout. */
html[data-cms-status-theme="light"],
html[data-cms-status-theme] .cms-match-status[data-cms-button-theme="light"] {
  --cms-upcoming-bg: #eaf0f6;
  --cms-upcoming-text: #47647d;
  --cms-upcoming-border: #b8c9d9;
  --cms-final-bg: #eff1f3;
  --cms-final-text: #66717d;
  --cms-final-border: #d5dce3;
  --cms-preview-bg: #ffffff;
  --cms-preview-text: #374151;
  --cms-preview-border: #dce4ec;
}
html[data-cms-status-theme="dark"],
html[data-cms-status-theme] .cms-match-status[data-cms-button-theme="dark"] {
  --cms-upcoming-bg: #3e5b72;
  --cms-upcoming-text: #eef3f7;
  --cms-upcoming-border: #6b859a;
  --cms-final-bg: #303e48;
  --cms-final-text: #b5c0ca;
  --cms-final-border: #4b5d6c;
  --cms-preview-bg: #263641;
  --cms-preview-text: #dce6ed;
  --cms-preview-border: #465d6e;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] {
  background-image: none !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-indent: 0 !important;
  line-height: 1.4 !important;
  vertical-align: middle;
  min-height: 30px;
  min-width: 80px;
  transition: none !important;
  animation: none !important;
  gap: 4px;
  white-space: nowrap;
  text-decoration: none !important;
}
/* The approved status buttons use centered text without legacy play ornaments. */
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state]::before,
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state]::after {
  content: none !important;
  display: none !important;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > svg,
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > i,
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > .btn_icon {
  display: none !important;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > .btn_name,
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > .cms-status-label {
  text-align: center !important;
  line-height: inherit !important;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state="upcoming"] {
  background-color: var(--cms-upcoming-bg) !important;
  color: var(--cms-upcoming-text) !important;
  border-color: var(--cms-upcoming-border) !important;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state="live"] {
  background-color: #f00000 !important;
  color: #ffffff !important;
  border-color: #f00000 !important;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state="final"],
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state="unknown"] {
  background-color: var(--cms-final-bg) !important;
  color: var(--cms-final-text) !important;
  border-color: var(--cms-final-border) !important;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state="delayed"],
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state="cancelled"],
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state="suspended"] {
  background-color: var(--cms-final-bg) !important;
  color: var(--cms-final-text) !important;
  border-color: var(--cms-upcoming-border) !important;
}
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > span,
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > svg,
html[data-cms-status-theme] body .cms-match-status.cms-match-status[data-cms-state] > i {
  color: inherit !important;
}
.cms-status-theme-preview {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--cms-preview-border);
  border-radius: 8px;
  background: var(--cms-preview-bg);
  color: var(--cms-preview-text);
  font: 14px/1.7 Arial, "Microsoft YaHei", sans-serif;
}
.cms-status-theme-preview strong { display: block; margin-bottom: 6px; }
.cms-status-theme-preview .cms-status-theme-samples { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.cms-status-theme-preview .cms-match-status { display: inline-block; padding: 6px 18px; line-height: 1.5; }
.cms-status-theme-preview small { display: block; }

[data-cms-status-text][data-cms-state]{color:#66717d!important}
[data-cms-status-text][data-cms-state="live"]{color:#e70000!important}
[data-cms-status-text][data-cms-state="upcoming"]{color:#47647d!important}
[data-cms-status-text][data-cms-button-theme="dark"]{color:#b5c0ca!important}
[data-cms-status-text][data-cms-button-theme="dark"][data-cms-state="live"]{color:#ff7a7a!important}
[data-cms-status-text][data-cms-button-theme="dark"][data-cms-state="upcoming"]{color:#d6e4ef!important}
