/* ===================================================================
   SETTINGS CARD
=================================================================== */

.smt-nl-settings-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 32px;
}

.smt-nl-settings-grid .smt-field-footer {
	grid-column: 1 / -1;
}

.smt-nl-settings-grid .smt-field-footer textarea {
	resize: vertical;
}

.smt-field.smt-field-inline input,
.smt-field.smt-field-inline textarea {
	flex: 1;
}

/* ===================================================================
   COMPOSE CARD
=================================================================== */

.smt-nl-subject-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.smt-nl-subject-row label {
	min-width: 70px;
	font-size: 13px;
	flex-shrink: 0;
}

.smt-nl-subject-row input {
	flex: 1;
}

/* --- Toolbar --- */

.smt-nl-toolbar {
	margin-bottom: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
}

.smt-nl-toolbar-label {
	font-size: 12px;
	font-weight: 600;
	color: #555;
	align-self: center;
	flex-shrink: 0;
}

.smt-nl-placeholders {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	flex: 1;
}

.smt-nl-insert-btns {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
	align-self: flex-start;
}

/* --- Product / Category popover --- */

.smt-nl-search-wrap {
	position: relative;
}

.smt-nl-search-popover {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 999;
	background: #fff;
	border: 1px solid #d0d0d8;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	width: 320px;
	padding: 10px;
}

.smt-nl-search-popover .smt-nl-search-input {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 8px;
	border-radius: 6px;
}

.smt-nl-search-results {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 220px;
	overflow-y: auto;
}

.smt-nl-search-results li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	transition: background .15s;
}

.smt-nl-search-results li:hover {
	background: #f3f4fb;
}

.smt-nl-search-results li img {
	width: 36px;
	height: 36px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.smt-nl-search-results li .smt-nl-result-info {
	min-width: 0;
}

.smt-nl-search-results li .smt-nl-result-title {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.smt-nl-search-results li .smt-nl-result-meta {
	font-size: 11px;
	color: #888;
}

.smt-nl-search-results li .smt-nl-insert-btn {
	margin-left: auto;
	flex-shrink: 0;
	font-size: 11px;
}

/* ===================================================================
   RECIPIENTS CARD
=================================================================== */

.smt-nl-type-toggle {
	display: flex;
	gap: 24px;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 500;
}

.smt-nl-type-opt {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.smt-nl-roles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 8px;
	margin-bottom: 16px;
}

/* Individual search */

.smt-nl-user-search-wrap {
	position: relative;
	margin-bottom: 10px;
}

.smt-nl-user-search-wrap .smt-nl-search-results {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #d0d0d8;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	max-height: 200px;
	overflow-y: auto;
	padding: 6px;
	z-index: 99;
}

.smt-nl-selected-users {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.smt-nl-user-tag {
	display: flex;
	align-items: center;
	gap: 5px;
	background: #eef0ff;
	border: 1px solid #c8cafe;
	border-radius: 20px;
	padding: 4px 10px;
	font-size: 12px;
	color: #444;
}

.smt-nl-user-tag button {
	background: none;
	border: none;
	cursor: pointer;
	color: #888;
	padding: 0;
	font-size: 14px;
	line-height: 1;
}

.smt-nl-user-tag button:hover {
	color: #c00;
}

.smt-nl-subscribed-row {
	margin-top: 10px;
	font-size: 13px;
}

/* ===================================================================
   SEND BAR
=================================================================== */

.smt-nl-send-row {
	display: flex;
	align-items: center;
	gap: 16px;
}

/* ===================================================================
   RESPONSIVE
=================================================================== */

@media (max-width: 900px) {
	.smt-nl-settings-grid {
		grid-template-columns: 1fr;
	}
	.smt-nl-settings-grid .smt-field-footer {
		grid-column: auto;
	}
}
