/**
 * Marketplace Tab View Styles
 *
 * Styles for the 2-tab Edit Supplier layout (Authorization | Sync Settings).
 */

/* ── Tab Container ─────────────────────────────────────────────── */
.momcs-marketplace-tab-container {
	max-width: 100%;
	margin: 0;
}

/* ── Tab Bar ───────────────────────────────────────────────────── */
.momcs-tab-bar {
	display: flex;
	gap: 0;
	border-bottom: 2px solid #e2e8f0;
	margin-bottom: 24px;
}

.momcs-tab-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
}

.momcs-tab-link:hover {
	color: #ea580c;
	text-decoration: none;
}

.momcs-tab-link:focus {
	outline: 2px solid #f97316;
	outline-offset: -2px;
	text-decoration: none;
}

.momcs-tab-link--active {
	color: #ea580c;
	border-bottom-color: #ea580c;
	font-weight: 600;
}

.momcs-tab-link--active:hover {
	color: #ea580c;
}

.momcs-tab-link--disabled {
	color: #94a3b8;
	cursor: not-allowed;
	opacity: 0.6;
}

.momcs-tab-link--disabled:hover {
	color: #94a3b8;
}

.momcs-tab-link-icon {
	display: inline-flex;
	align-items: center;
}

.momcs-tab-link-icon svg {
	width: 18px;
	height: 18px;
}

.momcs-tab-lock-icon {
	font-size: 14px;
	margin-left: 4px;
	vertical-align: middle;
}

/* ── Tab Content ───────────────────────────────────────────────── */
.momcs-tab-content {
	min-height: 300px;
}

/* ── Connected Status (Tab 1 - Returning user) ─────────────────── */
.momcs-auth-connected-status {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	padding: 24px;
}

.momcs-auth-connected-card {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 20px;
}

.momcs-auth-connected-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #dcfce7;
	color: #16a34a;
	display: flex;
	align-items: center;
	justify-content: center;
}

.momcs-auth-connected-icon .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
}

.momcs-auth-connected-info h3 {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
	color: #1e293b;
}

.momcs-auth-connected-details {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	color: #64748b;
	font-size: 13px;
	margin: 0;
}

.momcs-auth-connected-detail strong {
	color: #475569;
}

.momcs-auth-connected-actions {
	border-top: 1px solid #e2e8f0;
	padding-top: 16px;
}

/* Reauthorize button: same look as Save settings button */
#momcs-reauthorize-btn {
	background: #f97316 !important;
	border-color: #ea580c !important;
	color: #fff !important;
	padding: 3px 24px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

#momcs-reauthorize-btn:hover {
	opacity: 0.9;
}

/* ── Sync Tab: Account Settings Panel ───────────────────────────── */
.momcs-sync-tab-account-settings {
	padding: 0;
}

/* ── Section Divider ───────────────────────────────────────────── */
.momcs-section-divider {
	border: none;
	border-top: 1px solid #e2e8f0;
	margin: 24px 0;
}

/* ── Sidebar Save Button ──────────────────────────────────────── */
.momcs-sidebar-save-bar {
	padding: 20px 20px 8px;
}

#momcs-global-save-btn {
	background: #f97316;
	border-color: #ea580c !important;
	color: #fff !important;
	padding: 3px 24px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

#momcs-global-save-btn:hover {
	opacity: 0.9;
}

#momcs-global-save-btn:disabled {
	background: #f97316 !important;
	border-color: #ea580c !important;
	color: #fff !important;
	opacity: 0.85;
	cursor: not-allowed;
}

/* ── Tab Notice (success/error toast) ──────────────────────────── */
.momcs-tab-notice {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 13px;
	font-weight: 500;
}

.momcs-tab-notice-success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.momcs-tab-notice-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 782px) {
	.momcs-tab-bar {
		flex-wrap: wrap;
	}

	.momcs-tab-link {
		padding: 10px 16px;
		font-size: 13px;
	}

	.momcs-auth-connected-card {
		flex-direction: column;
	}

	.momcs-global-save-bar {
		padding: 12px 16px;
	}
}
