/**
 * Settings page styles.
 * Same Tailwind-like aesthetic as new-message-template (wacc-tpl-card).
 * Tabs (nav-tab-wrapper) are NOT styled - left as WordPress default.
 *
 * @package AfroIT_Messaging_WorkflowAutomations
 */

/* Settings page wrapper */
.wacc-settings-wrap {
	--wacc-bg: #f8fafc;
	--wacc-card-bg: #ffffff;
	--wacc-border: #e2e8f0;
	--wacc-text: #1e293b;
	--wacc-text-muted: #64748b;
	--wacc-accent: #2563eb;
	--wacc-accent-hover: #1d4ed8;
	--wacc-radius: 8px;
	--wacc-radius-lg: 12px;
	--wacc-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.woocommerce_page_afroit-messaging-workflows #wpcontent {
   padding-left: 0 !important;
}
.wacc-wrap {
    padding: 0;
}
.wacc-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 60px;
    background: #ffffff;
    position: sticky;
    top: 0;
    padding-left: 20px;
    z-index: 100;
}
.wacc-header h1 {
    flex: 1 auto;
    font-weight: 600;
    font-size: 16px;
    color: #070707
}
.wacc-header .nav-tab {
    border: none;
    background: none;
}
.wacc-header .nav-tab-active {
    border-bottom: 2px solid var(--wp-admin-theme-color);
    color: var(--wp-admin-theme-color);
}
.wacc-header .nav-tab:first-child {
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.wacc-content {
    padding-left: 20px;
}
.wacc-content .wp-heading-inline {
    font-size: 17px;
}

.wacc-settings-wrap {
	/* background: var(--wacc-bg); */
	margin: 0;
	max-width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
}
.wacc-settings-wrap .wp-heading-inline {
    display: none !important;
}

/* Side-by-side forms (e.g. Meta App + system user token) */
.wacc-settings-wrap .wacc-settings-row--two-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
	margin-bottom: 24px;
}

.wacc-settings-wrap .wacc-settings-row--two-cols .wacc-tpl-card {
	margin-bottom: 0;
}

@media screen and (max-width: 960px) {
	.wacc-settings-wrap .wacc-settings-row--two-cols {
		grid-template-columns: 1fr;
	}

	.wacc-settings-wrap .wacc-settings-row--two-cols .wacc-tpl-card {
		margin-bottom: 24px;
	}

	.wacc-settings-wrap .wacc-settings-row--two-cols .wacc-tpl-card:last-child {
		margin-bottom: 0;
	}
}

/* Card sections (shared with new-message-template) */
.wacc-settings-wrap .wacc-tpl-card {
	background: var(--wacc-card-bg);
	border-radius: var(--wacc-radius-lg);
	box-shadow: var(--wacc-shadow);
	padding: 24px;
	margin-bottom: 24px;
}

.wacc-settings-wrap .wacc-tpl-card__title {
	font-size: 16px;
	font-weight: 600;
	color: var(--wacc-text);
	margin: 0 0 20px;
	padding: 0;
	line-height: 1.4;
}

.wacc-settings-wrap .wacc-tpl-description,
.wacc-settings-wrap .wacc-tpl-card p {
	font-size: 14px;
	color: var(--wacc-text-muted);
	line-height: 1.5;
	margin: 0 0 12px;
}

.wacc-settings-wrap .wacc-tpl-card p:last-child,
.wacc-settings-wrap .wacc-tpl-card > p:last-of-type {
	margin-bottom: 0;
}

.wacc-settings-wrap .wacc-tpl-card a {
	/* color: var(--wacc-accent); */
	text-decoration: none;
}

.wacc-settings-wrap .wacc-tpl-card a:hover {
	text-decoration: none;
}

/* Prevent horizontal overflow */
.wacc-settings-wrap .wacc-tpl-card {
	max-width: 100%;
	overflow-wrap: break-word;
}

.wacc-settings-wrap .wacc-tpl-card a {
	word-break: break-all;
}

/* Form table overrides inside cards */
.wacc-settings-wrap .wacc-tpl-card .form-table {
	margin-top: 0;
	table-layout: fixed;
	width: 100%;
}

.wacc-settings-wrap .wacc-tpl-card .form-table th {
	padding: 12px 10px 12px 0;
	font-weight: 500;
	color: var(--wacc-text);
}

.wacc-settings-wrap .wacc-tpl-card .form-table td {
	padding: 12px 10px;
}

.wacc-settings-wrap .wacc-tpl-card .form-table input[type="text"],
.wacc-settings-wrap .wacc-tpl-card .form-table input[type="password"],
.wacc-settings-wrap .wacc-tpl-card .form-table input[type="url"] {
	width: 100%;
	max-width: 400px;
	padding: 10px 14px;
	font-size: 14px;
	border: 1px solid var(--wacc-border);
	border-radius: var(--wacc-radius);
}

.wacc-settings-wrap .wacc-tpl-card .form-table input.large-text {
	max-width: 100%;
}

.wacc-settings-wrap .wacc-tpl-card .form-table input:focus {
	outline: none;
	border-color: var(--wacc-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wacc-settings-wrap .wacc-tpl-card .form-table .description {
	color: var(--wacc-text-muted);
	font-size: 13px;
	margin-top: 6px;
}

/* Prerequisites step checkbox */
.wacc-settings-wrap .wacc-tpl-step {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
}

.wacc-settings-wrap .wacc-tpl-step:last-child {
	margin-bottom: 0;
}

.wacc-settings-wrap .wacc-tpl-step__checkbox {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	flex-shrink: 0;
	accent-color: var(--wacc-accent);
}

.wacc-settings-wrap .wacc-tpl-step__content {
	flex: 1;
	min-width: 0;
}

.wacc-settings-wrap .wacc-tpl-step__content h3 {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--wacc-text);
}

.wacc-settings-wrap .wacc-tpl-step__content p {
	margin: 0 0 8px;
}

.wacc-settings-wrap .wacc-tpl-step__content ul {
	margin: 8px 0;
	padding-left: 20px;
}

.wacc-settings-wrap .wacc-tpl-step__content li {
	margin-bottom: 4px;
}

/* Radio buttons */
.wacc-settings-wrap .wacc-tpl-radio-option {
	display: block;
	padding: 0;
	margin-bottom: 12px;
	border: 1px solid var(--wacc-border);
	border-radius: var(--wacc-radius);
	background: var(--wacc-card-bg);
	transition: border-color 0.15s, background 0.15s;
}

.wacc-settings-wrap .wacc-tpl-radio-option:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
}

.wacc-settings-wrap .wacc-tpl-radio-option__label {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	cursor: pointer;
	margin: 0;
}

.wacc-settings-wrap .wacc-tpl-radio-option input[type="radio"] {
	flex-shrink: 0;
	accent-color: var(--wacc-accent);
	cursor: pointer;
	margin: 0;
}

.wacc-settings-wrap .wacc-tpl-radio-option__label span {
	flex: 1;
	font-size: 14px;
	color: var(--wacc-text);
}

.wacc-settings-wrap .wacc-tpl-radio-option:has(input[type="radio"]:checked) {
	border-color: var(--wacc-accent);
	background: rgba(37, 99, 235, 0.05);
}

.wacc-settings-wrap .wacc-tpl-radio-option:has(input[type="radio"]:disabled) {
	opacity: 0.6;
	cursor: not-allowed;
}

.wacc-settings-wrap .wacc-tpl-radio-option:has(input[type="radio"]:disabled) .wacc-tpl-radio-option__label {
	cursor: not-allowed;
}

/*
.wacc-settings-wrap .wacc-tpl-card .button {
	border-radius: var(--wacc-radius);
	padding: 8px 16px;
}

.wacc-settings-wrap .wacc-tpl-card .button-primary {
	background: var(--wacc-accent);
	border-color: var(--wacc-accent);
}

.wacc-settings-wrap .wacc-tpl-card .button-primary:hover {
	background: var(--wacc-accent-hover);
	border-color: var(--wacc-accent-hover);
}
*/

/* Notice inside cards */
.wacc-settings-wrap .wacc-tpl-card .notice {
	margin: 0 0 16px;
}

.wacc-settings-wrap .wacc-tpl-card .notice:last-child {
	margin-bottom: 0;
}

/* Actions row */
.wacc-settings-wrap .wacc-tpl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
}

/* Checkbox styling in form tables */
.wacc-settings-wrap .wacc-tpl-card .form-table input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--wacc-accent);
}

.wacc-settings-wrap .wacc-tpl-card .form-table label {
	cursor: pointer;
}

