/* Email Template Settings Page Styles */

.peiwm-settings-wrap .peiwm-settings-header {
	background: #f9fafb;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid #2563eb;
	margin-bottom: 24px;
}

.peiwm-settings-wrap .peiwm-settings-header .description {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #4b5563;
}

/* Settings Table */
.peiwm-settings-table {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

.peiwm-settings-table th {
	background: #f9fafb;
	font-weight: 600;
	color: #111827;
	padding: 16px 20px;
	width: 25%;
}

.peiwm-settings-table td {
	padding: 16px 20px;
	background: #ffffff;
}

.peiwm-settings-table tr {
	border-bottom: 1px solid #e5e7eb;
}

.peiwm-settings-table tr:last-child {
	border-bottom: none;
}

.peiwm-settings-table .description {
	margin-top: 8px;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}

/* Color Inputs */
.peiwm-settings-table input[type="color"] {
	width: 60px;
	height: 40px;
	border: 2px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.peiwm-settings-table input[type="color"]:hover {
	border-color: #2563eb;
}

.peiwm-settings-table input[type="color"]:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Settings Section */
.peiwm-settings-section {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 24px;
	margin-top: 24px;
}

.peiwm-settings-section h2 {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	color: #111827;
}

.peiwm-settings-section .description {
	margin: 0 0 16px 0;
	font-size: 14px;
	color: #6b7280;
	line-height: 1.6;
}

/* Tags Grid */
.peiwm-tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.peiwm-tag-item {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s ease;
}

.peiwm-tag-item:hover {
    border-color: var(--primary);
}

.peiwm-tag-code {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff7ed;
    color: #c2410c;
    border: 0.5px solid var(--border-warm);
    border-radius: 5px;
    padding: 3px 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

.peiwm-tag-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Test Email Form */
.peiwm-test-email-form {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 16px;
}

.peiwm-test-email-form input[type="email"] {
	flex: 1;
	max-width: 400px;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	transition: all 0.2s ease;
}

.peiwm-test-email-form input[type="email"]:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.peiwm-test-email-form input[type="email"]:read-only {
	background: #f9fafb;
	cursor: not-allowed;
}

/* Button Group */
.peiwm-button-group {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e5e7eb;
}

.peiwm-button-group .button {
	padding: 8px 24px;
	height: auto;
	font-size: 14px;
	font-weight: 500;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.peiwm-button-group .button-primary {
	background: #2563eb;
	border-color: #2563eb;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.peiwm-button-group .button-primary:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.peiwm-button-group .button-secondary {
	background: #ffffff;
	border-color: #d1d5db;
	color: #374151;
}

.peiwm-button-group .button-secondary:hover {
	background: #f9fafb;
	border-color: #9ca3af;
	color: #111827;
}

/* Locked Section */
.peiwm-locked-section {
	position: relative;
	pointer-events: none;
	opacity: 0.6;
}

.peiwm-pro-upgrade-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	/* background: rgba(255, 255, 255, 0.95); */
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	cursor: pointer;
	pointer-events: all;
	border-radius: 8px;
	transition: all 0.3s ease;
	border: 2px dashed #e5e7eb;
}

.peiwm-pro-upgrade-overlay:hover {
	/* background: rgba(255, 255, 255, 0.98); */
	border-color: #2563eb;
}

.peiwm-pro-upgrade-badge {
	transition: all .3s ease;
    align-items: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    color: #fff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    gap: 3px;
    letter-spacing: .4px;
    margin-left: 6px;
    padding: 10px 25px;
    vertical-align: middle;
    white-space: nowrap;
}

.peiwm-pro-upgrade-overlay:hover .peiwm-pro-upgrade-badge {
	transform: scale(1.05);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Toast Notifications */
.peiwm-notification {
    position: fixed;
    top: 32px;
    right: 32px;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 40px -4px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
    z-index: 100001;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    opacity: 0;
    transform: translateX(420px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 4px solid #f97316;
}

.peiwm-notification.peiwm-show {
    opacity: 1;
    transform: translateX(0);
}

/* Success — orange brand */
.peiwm-notification.peiwm-success {
    border-left-color: #f97316;
}

.peiwm-notification.peiwm-success::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #fff7ed;        /* soft orange bg */
    color: #f97316;             /* brand orange icon */
    border: 1.5px solid #fed7aa;
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* Error — keep red but tinted, no heavy fill */
.peiwm-notification.peiwm-error {
    border-left-color: #ef4444;
}

.peiwm-notification.peiwm-error::before {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #fef2f2;        /* soft red bg */
    color: #ef4444;             /* red icon, no solid fill */
    border: 1.5px solid #fecaca;
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}