/* Anyzone Viewport 0.1.66 — shared theme controls.
 * One renderer and one controller power both the Themes page and the
 * temporary in-workspace theme drawer.
 */

.anyzone-shared-theme-controls,
.anyzone-shared-theme-controls *,
.anyzone-shared-theme-controls *::before,
.anyzone-shared-theme-controls *::after {
  box-sizing: border-box;
}

.anyzone-shared-theme-controls {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  color: #1d2327;
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.anyzone-shared-theme-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dcdcde;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(0,0,0,.055);
}

.anyzone-shared-theme-section__heading {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font: inherit !important;
}

.anyzone-shared-theme-section__toggle {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1d2327;
  font: 650 15px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.anyzone-shared-theme-section__toggle:hover {
  background: #f6f7f7;
  color: #1d2327;
}

.anyzone-shared-theme-section__toggle:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #2271b1;
  outline-offset: -2px;
}

.anyzone-shared-theme-section__caret {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #646970;
  border-bottom: 2px solid #646970;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 140ms ease;
}

.anyzone-shared-theme-section__toggle[aria-expanded="true"] .anyzone-shared-theme-section__caret {
  transform: rotate(225deg) translate(-1px, -1px);
}

.anyzone-shared-theme-section__body {
  padding: 0 16px 16px;
  border-top: 1px solid #ececef;
}

.anyzone-shared-theme-section__body[hidden] {
  display: none !important;
}

.anyzone-shared-theme-section__body > p {
  margin: 14px 0 16px;
  color: #646970;
  font-size: 12px;
  line-height: 1.5;
}

.anyzone-shared-field-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px 0;
  border-top: 1px solid #ececef;
}

.anyzone-shared-field-row:first-of-type {
  padding-top: 4px;
  border-top: 0;
}

.anyzone-shared-field-row label,
.anyzone-shared-field-row legend,
.anyzone-shared-field-label {
  margin: 0;
  color: #1d2327;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.anyzone-shared-field-row output {
  float: right;
  color: #646970;
  font-weight: 500;
}

.anyzone-shared-field-row > small {
  color: #646970;
  font-size: 10px;
  line-height: 1.45;
}

.anyzone-shared-field-row input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #2271b1;
}

.anyzone-shared-color-control {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.anyzone-shared-color-control input[type="color"] {
  width: 42px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 3px;
  border: 1px solid #c3c4c7;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
}

.anyzone-shared-color-control input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid #8c8f94;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 0 0 transparent;
  color: #2c3338;
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.anyzone-shared-color-control input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: 2px solid transparent;
}

.anyzone-shared-segment-field {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 14px 0;
  border: 0;
}

.anyzone-shared-segment-field::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: #ececef;
}

.anyzone-shared-segment-field:first-of-type {
  padding-top: 4px;
}

.anyzone-shared-segment-field:first-of-type::before {
  display: none;
}

.anyzone-shared-segment-field legend {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 8px;
  padding: 0;
  float: none;
}

.anyzone-shared-segment-field legend + .anyzone-shared-segmented {
  clear: both;
}

.anyzone-shared-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.anyzone-shared-segmented button {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  min-height: 36px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #c3c4c7;
  border-radius: 7px;
  background: #f6f7f7;
  box-shadow: none;
  color: #2c3338;
  font: 650 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: none;
  cursor: pointer;
}

.anyzone-shared-segmented button:hover {
  border-color: #8c8f94;
  background: #fff;
  color: #1d2327;
}

.anyzone-shared-segmented button.is-active {
  border-color: #2271b1;
  background: #eaf4fc;
  box-shadow: inset 0 0 0 1px #2271b1;
  color: #135e96;
}

.anyzone-shared-segmented button:focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

.anyzone-shared-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid #ececef;
}

.anyzone-shared-theme-section__body > p + .anyzone-shared-toggle-row {
  border-top: 0;
}

.anyzone-shared-toggle-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.anyzone-shared-toggle-row strong {
  color: #1d2327;
  font-size: 12px;
}

.anyzone-shared-toggle-row small {
  color: #646970;
  font-size: 10px;
  line-height: 1.45;
}

.anyzone-shared-toggle-row input[type="checkbox"] {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  min-width: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #8c8f94;
  border-radius: 999px;
  background: #dcdcde;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.anyzone-shared-toggle-row input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.24);
  transform: none;
  transition: left 140ms ease;
}

.anyzone-shared-toggle-row input[type="checkbox"]:checked {
  border-color: #2271b1;
  background: #2271b1;
}

.anyzone-shared-toggle-row input[type="checkbox"]:checked::before {
  left: 21px;
}

.anyzone-shared-toggle-row input[type="checkbox"]:focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

.anyzone-shared-toggle-row input[type="checkbox"]:disabled,
.anyzone-shared-field-row input:disabled,
.anyzone-shared-segmented button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.anyzone-shared-image-control {
  display: grid;
  gap: 10px;
}

.anyzone-shared-image-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 110px;
  overflow: hidden;
  border: 1px dashed #a7aaad;
  border-radius: 9px;
  background:
    linear-gradient(45deg, #f0f0f1 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f0f1 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f1 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  color: #646970;
}

.anyzone-shared-image-preview::after {
  content: "No image selected";
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(255,255,255,.90);
  font-size: 10px;
  font-weight: 650;
}

.anyzone-shared-image-preview.has-image {
  border-style: solid;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.anyzone-shared-image-preview.has-image::after {
  content: "Workspace image";
  background: rgba(18,24,32,.72);
  color: #fff;
  backdrop-filter: blur(8px);
}

.anyzone-shared-image-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.anyzone-shared-image-actions .button {
  min-height: 30px;
  margin: 0;
}

.anyzone-shared-image-actions .button-link-delete {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b32d2e;
  cursor: pointer;
}

.anyzone-shared-fold-settings,
.anyzone-shared-independent-theme {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ececef;
}

.anyzone-shared-fold-settings > h3,
.anyzone-shared-independent-theme > h3 {
  margin: 0 0 3px;
  color: #1d2327;
  font-size: 13px;
}

.anyzone-shared-fold-settings > h3 {
  letter-spacing: .05em;
}

.anyzone-shared-fold-settings > p,
.anyzone-shared-independent-theme > p {
  margin: 0 0 10px;
  color: #646970;
  font-size: 10px;
  line-height: 1.45;
}

.anyzone-shared-independent-theme {
  transition: opacity 140ms ease;
}

.anyzone-shared-independent-theme.is-disabled {
  opacity: .42;
}

[data-anyzone-fold-dependent].is-disabled {
  opacity: .45;
}

.anyzone-shared-css-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.anyzone-shared-css-color-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #1d2327;
  font-size: 10px;
  font-weight: 650;
}

.anyzone-shared-color-control--compact {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
}

.anyzone-shared-color-control--compact input[type="color"] {
  width: 34px;
  height: 32px;
  min-height: 32px;
  border-radius: 6px;
}

.anyzone-shared-color-control--compact input[type="text"] {
  min-height: 32px;
  padding: 0 7px;
  font-size: 10px;
}

@media (max-width: 430px) {
  .anyzone-shared-css-color-grid {
    grid-template-columns: 1fr;
  }
}

/* Front-end host quarantine: shared controls render identically in wp-admin
 * and in the temporary workspace drawer. */
.anyzone-shared-theme-controls button,
.anyzone-shared-theme-controls input,
.anyzone-shared-theme-controls select,
.anyzone-shared-theme-controls textarea {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: none;
}

.anyzone-shared-image-actions button.button,
.anyzone-shared-image-actions button.button-link-delete {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  margin: 0;
  padding: 0 10px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 11px;
  line-height: 28px;
  text-decoration: none;
}

.anyzone-shared-image-actions button.button {
  border: 1px solid #2271b1;
  background: #f6f7f7;
  color: #135e96;
}

.anyzone-shared-image-actions button.button-link-delete {
  border: 1px solid transparent;
  background: transparent;
  color: #b32d2e;
}
