/**
 * mime-mt-edit.css
 * Styles for the Membership Type edit screen — Meta Fields tab.
 * Follows WP admin conventions. All classes prefixed mime-.
 */

/* -------------------------------------------------------
   Tab content visibility
   initTabSwitcher() adds/removes .active on .mime-tab-content
   ------------------------------------------------------- */

.mime-tab-content {
	display: none;
}

.mime-tab-content.active {
	display: block;
}


/* -------------------------------------------------------
   Subsubsub — mini tab row sitting flush above the table.
   Clicking Profile | Registration switches the table below.
   ------------------------------------------------------- */

ul.mime-meta-subsubsub {
	list-style: none;
	display: flex;
}

ul.mime-meta-subsubsub a {
	display: inline-block;
	font-size: 13px;
	font-weight: 400;
	color: #2271b1;
	text-decoration: none;
	padding: .2em;
	cursor: pointer;
	line-height: 2;
}

.mime-meta-subsubsub a.current {
	font-weight: 600;
	color: #1d2327;
}

.mime-meta-subsubsub a:hover:not(.current) {
	cursor: default;
}


/* -------------------------------------------------------
   Meta fields card (table wrapper)
   ------------------------------------------------------- */

.mime-meta-card {
	border: 1px solid #c3c4c7;
	border-radius: 0 4px 4px 4px;
	overflow: hidden;
	margin-bottom: 1rem;
	background: #fff;
}

.mime-meta-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.mime-meta-table th {
	font-size: 11px;
	font-weight: 600;
	color: #646970;
	padding: 7px 10px;
	border-bottom: 1px solid #c3c4c7;
	text-align: left;
	background: #f6f7f7;
}

.mime-meta-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
	color: #1d2327;
	vertical-align: middle;
}

.mime-meta-table tbody tr:last-child td {
	border-bottom: none;
}

.mime-meta-table tbody tr:hover td {
	background: #f6f7f7;
}

/* empty state row */
.mime-empty-row td {
	text-align: center;
	color: #646970;
	font-style: italic;
	padding: 20px 10px;
}

.mime-empty-row:hover td {
	background: transparent !important;
}


/* -------------------------------------------------------
   Field name + slug
   ------------------------------------------------------- */

.mime-fname {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
}

.mime-fslug {
	font-size: 11px;
	color: #646970;
	margin-top: 2px;
}


/* -------------------------------------------------------
   Type / width badge (read-only)
   ------------------------------------------------------- */

.mime-badge {
	display: inline-block;
	font-size: 11px;
	padding: 2px 7px;
	border-radius: 3px;
	background: #f6f7f7;
	color: #646970;
	border: 1px solid #c3c4c7;
	white-space: nowrap;
}


/* -------------------------------------------------------
   Required badge
   ------------------------------------------------------- */

.mime-req-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	padding: 1px 5px;
	border-radius: 3px;
	background: #fef3cd;
	color: #6d4c00;
	border: 1px solid #f5c842;
	white-space: nowrap;
	vertical-align: middle;
}


/* -------------------------------------------------------
   Order buttons (▲▼)
   ------------------------------------------------------- */

.mime-order-btns {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mime-ob {
	display: block;
	background: none;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	cursor: pointer;
	font-size: 9px;
	line-height: 1;
	padding: 2px 5px;
	color: #646970;
	font-family: inherit;
}

.mime-ob:hover:not(:disabled) {
	background: #f6f7f7;
	color: #1d2327;
	border-color: #8c8f94;
}

.mime-ob:disabled {
	opacity: 0.2;
	cursor: default;
}


/* -------------------------------------------------------
   Remove button (✕)
   ------------------------------------------------------- */

.mime-remove-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	color: #646970;
	padding: 2px 5px;
	border-radius: 3px;
	font-family: inherit;
	line-height: 1;
}

.mime-remove-btn:hover {
	color: #b32d2e;
	background: #fcf0f1;
}


/* -------------------------------------------------------
   Segmented controls (width / privacy / can_edit)
   ------------------------------------------------------- */

.mime-seg {
	display: inline-flex;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	overflow: hidden;
}

.mime-seg-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	font-size: 11px;
	font-family: inherit;
	background: transparent;
	border: none;
	border-right: 1px solid #c3c4c7;
	cursor: pointer;
	color: #646970;
	white-space: nowrap;
	line-height: 1.4;
}

.mime-seg-btn:last-child {
	border-right: none;
}

.mime-seg-btn:hover:not(.mime-seg-on):not(.mime-seg-yes-on):not(.mime-seg-no-on) {
	background: #f6f7f7;
	color: #1d2327;
}

/* width — selected state: lifted/inset feel */
.mime-seg-btn.mime-seg-on {
	background: #f0f0f1;
	color: #1d2327;
	font-weight: 600;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

/* privacy — each option has its own colour when selected */
.mime-seg-btn.mime-seg-privacy-all.mime-seg-on {
	background: #edfaef;
	color: #1a6b2a;
	font-weight: 600;
}

.mime-seg-btn.mime-seg-privacy-members.mime-seg-on {
	background: #f0effe;
	color: #3730a3;
	font-weight: 600;
}

.mime-seg-btn.mime-seg-privacy-owner.mime-seg-on {
	background: #fff8e6;
	color: #7a4f00;
	font-weight: 600;
}

/* can_edit — yes/no */
.mime-seg-btn.mime-seg-yes-on {
	background: #edfaef;
	color: #1a6b2a;
	font-weight: 600;
}

.mime-seg-btn.mime-seg-no-on {
	background: #fcf0f1;
	color: #b32d2e;
	font-weight: 600;
}


/* -------------------------------------------------------
   Width bar icons (inside width toggle buttons)
   ------------------------------------------------------- */

.mime-bar-wrap {
	display: inline-flex;
	gap: 2px;
	align-items: center;
}

.mime-bar {
	display: inline-block;
	height: 9px;
	border-radius: 1px;
	background: currentColor;
	opacity: 0.5;
}


/* -------------------------------------------------------
   Available fields pool
   ------------------------------------------------------- */

.mime-pool-wrap {
	margin-top: 8px;
	margin-bottom: 1.5rem;
}

.mime-pool-label {
	font-size: 12px;
	font-weight: 600;
	color: #646970;
	margin-bottom: 8px;
}

.mime-pool {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 24px;
}

.mime-pool-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 10px 5px 12px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: 12px;
	color: #1d2327;
}

.mime-pool-name {
	font-weight: 600;
}

.mime-pool-type {
	font-size: 11px;
	color: #646970;
}

.mime-add-btn {
	background: none;
	border: 1px solid #1d9e75;
	cursor: pointer;
	font-size: 11px;
	font-weight: 600;
	color: #0f6e56;
	padding: 2px 7px;
	border-radius: 3px;
	font-family: inherit;
	line-height: 1.4;
}

.mime-add-btn:hover {
	background: #edfaf5;
}

.mime-pool-empty {
	font-size: 12px;
	color: #646970;
	font-style: italic;
}