/* EquaFrame: admin */

.eqfr-wrap [hidden] { display: none !important; }

.eqfr-wrap :focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* ------------------------------------------------------------ list / help */

.eqfr-help { max-width: 860px; padding: 0 20px 12px; margin-top: 16px; }
.eqfr-help-list { list-style: disc; margin-left: 1.5em; }
.eqfr-shortcode, .eqfr-shortcode-example {
	display: inline-block;
	padding: 4px 8px;
	background: #f0f0f1;
	user-select: all;
}
.eqfr-empty { max-width: 560px; padding: 0 20px 12px; }
.eqfr-table .eqfr-copy { margin-left: 6px; }

/* ------------------------------------------------------------ add new */

.eqfr-new-form { max-width: 960px; }
.eqfr-layout-picker { margin: 24px 0; border: 0; padding: 0; }
.eqfr-layout-picker legend { margin-bottom: 8px; font-size: 14px; }
.eqfr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.eqfr-card { display: block; position: relative; cursor: pointer; }
.eqfr-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.eqfr-card-body {
	display: flex; flex-direction: column; gap: 8px; height: 100%;
	padding: 14px; border: 2px solid #8c8f94; border-radius: 6px; background: #fff;
}
.eqfr-card:hover .eqfr-card-body { border-color: #2271b1; }
.eqfr-card input:checked + .eqfr-card-body { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; background: #f0f6fc; }
.eqfr-card input:focus-visible + .eqfr-card-body { outline: 3px solid #1d2327; outline-offset: 2px; }
.eqfr-card-title { font-weight: 600; font-size: 15px; }
.eqfr-card-title::after { content: ""; }
.eqfr-card input:checked + .eqfr-card-body .eqfr-card-title::before { content: "✓ "; color: #2271b1; }
.eqfr-card-desc { color: #50575e; }

.eqfr-card-preview { display: grid; gap: 3px; height: 70px; }
.eqfr-card-preview i { background: #a7aaad; border-radius: 2px; }
.eqfr-preview-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.eqfr-preview-masonry { display: block; column-count: 3; column-gap: 3px; }
.eqfr-preview-masonry i { display: block; margin-bottom: 3px; height: 30px; }
.eqfr-preview-masonry i:nth-child(2n) { height: 22px; }
.eqfr-preview-masonry i:nth-child(3n) { height: 36px; }
.eqfr-preview-mosaic { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); }
.eqfr-preview-mosaic i:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.eqfr-preview-mosaic i:nth-child(4) { grid-column: span 2; }
.eqfr-preview-slideshow { grid-template-columns: repeat(4, 1fr); grid-template-rows: 3fr 1fr; }
.eqfr-preview-slideshow i:nth-child(1) { grid-column: 1 / -1; }
.eqfr-preview-slideshow i:nth-child(n + 6) { display: none; }

/* ------------------------------------------------------------ editor chrome */

.eqfr-shortcode-bar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
	margin: 12px 0; padding: 10px 14px; background: #fff; border: 1px solid #c3c4c7;
}
.eqfr-sc-hint { color: #50575e; }

.eqfr-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid #c3c4c7; margin-top: 16px; }
.eqfr-tab {
	appearance: none; margin: 0 4px -1px 0; padding: 10px 16px;
	border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0;
	background: transparent; color: #2c3338; font: inherit; font-size: 14px; cursor: pointer; min-height: 44px;
}
.eqfr-tab:hover { background: #fff; border-color: #c3c4c7; color: #1d2327; }
.eqfr-tab[aria-selected="true"] { background: #fff; border-color: #c3c4c7; font-weight: 600; color: #1d2327; box-shadow: inset 0 3px 0 #2271b1; }

.eqfr-panel { background: #fff; border: 1px solid #c3c4c7; border-top: 0; padding: 8px 24px 24px; max-width: 1100px; }
.eqfr-panel > h2 { margin-top: 16px; }
.eqfr-panel h3 { margin: 24px 0 8px; }

.eqfr-field { margin: 14px 0; }
.eqfr-field > label:first-child { display: inline-block; font-weight: 600; margin-bottom: 4px; }
.eqfr-field input[type="checkbox"] + * , .eqfr-field label:has(input[type="checkbox"]) { font-weight: 400; }
.eqfr-field .description { margin: 4px 0 0; max-width: 62ch; }
.eqfr-radios { border: 0; padding: 0; margin: 14px 0; }
.eqfr-radios legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.eqfr-radio { display: block; margin: 6px 0; }
.eqfr-inline { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: flex-start; }
.eqfr-number-row { display: flex; align-items: center; gap: 10px; }
.eqfr-number-row .eqfr-range { width: 220px; max-width: 40vw; }
.eqfr-unit { color: #50575e; }
.eqfr-subsection { margin-top: 20px; padding-top: 4px; border-top: 1px solid #dcdcde; }
.eqfr-fieldset { margin: 0 0 20px; padding: 4px 16px 12px; border: 1px solid #c3c4c7; }
.eqfr-fieldset legend { font-weight: 600; padding: 0 6px; }
.eqfr-color .wp-picker-container { margin-top: 2px; }

.eqfr-contrast { margin: 8px 0 16px; padding: 8px 10px; border-left: 4px solid; font-weight: 500; }
.eqfr-contrast.is-ok { border-color: #007017; background: #edfaef; color: #00450d; }
.eqfr-contrast.is-bad { border-color: #b32d2e; background: #fcf0f1; color: #8a1f20; }

.eqfr-savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 16px; margin-top: 0; padding: 12px 24px; background: #f6f7f7; border: 1px solid #c3c4c7; max-width: 1100px; z-index: 5; }
.eqfr-dirty { color: #8a2424; font-weight: 600; }

/* ------------------------------------------------------------ appearance preview */

.eqfr-appearance-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
@media (max-width: 900px) { .eqfr-appearance-grid { grid-template-columns: 1fr; } }
.eqfr-preview-sticky { position: sticky; top: 48px; }
.eqfr-preview-stage {
	display: grid; place-items: center; padding: 36px; min-height: 260px;
	background: repeating-conic-gradient(#f0f0f1 0 25%, #fff 0 50%) 0 0 / 20px 20px; border: 1px solid #c3c4c7;
}
.eqfr-preview-tile {
	width: 170px; height: 130px; background: linear-gradient(135deg, #2271b1, #72aee6 50%, #dba617) center / cover;
}

/* ------------------------------------------------------------ images tab */

.eqfr-images-toolbar { display: flex; align-items: center; gap: 16px; }
.eqfr-count { color: #50575e; }
.eqfr-rows { margin: 12px 0; padding: 0; list-style: none; }
.eqfr-row {
	position: relative; display: grid; grid-template-columns: 28px 100px minmax(0, 1fr); gap: 14px; align-items: start;
	margin: 0 0 8px; padding: 10px 52px 10px 10px; background: #fff; border: 1px solid #c3c4c7; border-radius: 4px;
}
.eqfr-row-placeholder { background: #f0f6fc; border: 2px dashed #2271b1; visibility: visible !important; min-height: 120px; }
.eqfr-row.ui-sortable-helper { box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.eqfr-handle { cursor: grab; color: #50575e; padding-top: 38px; text-align: center; }
.eqfr-thumb { width: 100px; height: 100px; object-fit: cover; border-radius: 3px; background: #dcdcde; cursor: grab; }
.eqfr-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.eqfr-f { display: flex; flex-direction: column; gap: 2px; }
.eqfr-f-label { font-weight: 600; font-size: 12px; color: #1d2327; }
.eqfr-f input { width: 100%; }
.eqfr-alt-note { grid-column: 1 / -1; margin: 0; color: #6b4a00; background: #fcf9e8; border-left: 4px solid #dba617; padding: 4px 8px; font-size: 12px; }
.eqfr-remove {
	position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; margin: 0;
	display: inline-flex; align-items: center; justify-content: center;
	background: #fff; border: 1px solid #8c8f94; border-radius: 4px; color: #50575e; cursor: pointer;
}
.eqfr-remove:hover { background: #fcf0f1; border-color: #b32d2e; color: #b32d2e; }
.eqfr-remove .dashicons { width: 20px; height: 20px; font-size: 20px; }
@media (max-width: 782px) {
	.eqfr-row { grid-template-columns: 80px minmax(0, 1fr); }
	.eqfr-handle { display: none; }
	.eqfr-fields { grid-template-columns: 1fr; }
}
.eqfr-empty-msg { padding: 24px; border: 2px dashed #c3c4c7; text-align: center; color: #50575e; }
.eqfr-status { min-height: 24px; font-weight: 500; }
.eqfr-status.is-error { color: #8a1f20; }

/* ------------------------------------------------------------ styles tab */

.eqfr-details { margin: 12px 0; border: 1px solid #c3c4c7; background: #fff; }
.eqfr-details summary { padding: 10px 14px; font-weight: 600; cursor: pointer; background: #f6f7f7; }
.eqfr-style-row { padding: 10px 14px; border-top: 1px solid #dcdcde; }
.eqfr-style-row p { margin: 0 0 6px; }
.eqfr-style-class code { font-size: 14px; font-weight: 600; }
.eqfr-style-scoped { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eqfr-tips { list-style: disc; margin-left: 20px; max-width: 820px; }

/* ------------------------------------------------------------ close button icon picker */

.eqfr-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-width: 760px; margin-top: 6px; }
.eqfr-icon-opt {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px;
	padding: 10px 6px 8px; background: #fff; border: 1px solid #c3c4c7; border-radius: 4px; cursor: pointer; text-align: center;
}
.eqfr-icon-opt:hover { border-color: #2271b1; }
.eqfr-icon-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.eqfr-icon-opt:has(input:checked) { border-color: #2271b1; box-shadow: inset 0 0 0 2px #2271b1; background: #f0f6fc; }
.eqfr-icon-opt:has(input:focus-visible) { outline: 2px solid #1d2327; outline-offset: 2px; }
.eqfr-icon-face { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: #1d2327; }
.eqfr-icon-face .eqfr-icon { width: 24px; height: 24px; }
.eqfr-icon-face-text { font-weight: 600; font-size: 14px; }
.eqfr-icon-name { font-size: 12px; line-height: 1.3; color: #50575e; }
.eqfr-colors-inline { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: flex-start; }
.eqfr-colors-inline .eqfr-field { flex: 0 1 220px; }
.eqfr-close-preview-wrap { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
.eqfr-close-preview-label { font-weight: 600; }
.eqfr-close-preview { display: flex; align-items: center; justify-content: center; width: 140px; height: 76px; background: #1d2327; border-radius: 4px; }
.eqfr-close-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; box-sizing: border-box; font-size: 16px; font-weight: 600; }
.eqfr-close-btn svg { width: 22px; height: 22px; }
.eqfr-close-btn.is-text { padding: 0 16px; }
