/* General styles */
#prodshow-settings.wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 30px;
	overflow-x: hidden;
}

/* Ensure proper box-sizing */
#prodshow-settings *,
#prodshow-settings *::before,
#prodshow-settings *::after {
	box-sizing: border-box;
}

/* Prevent horizontal scroll */
body.toplevel_page_products-showcase {
	overflow-x: hidden;
}

#wpwrap {
	overflow-x: hidden;
}

/* Custom Admin Header */
#wpcontent {
	background: #f0f0f1;
	padding: 0;
}

.prodshow-topbar {
	background: #fff;
	overflow-x: hidden;
	max-width: 100%;
}



.prodshow-topbar .prodshow-header {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	background: #fff;
	padding: 23px 30px;
	border-bottom: 1px solid #dadadf;
	gap: 10px;
	align-items: center;
}

.prodshow-topbar .prodshow-header .prodshow-headline {
	font-size: 1.3rem;
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	color: #424242;
	margin: 0;
}
.prodshow-topbar .prodshow-header .prodshow-headline h1 {
	font-size: 1.3rem;
	margin: 0;
	color: #424242;
}
.prodshow-topbar .prodshow-headline-content{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
}
.prodshow-topbar .prodshow-headline-content span{
	font-size: 0.8rem;
	color: #1f2629;
	font-weight: 400;
}

.prodshow-topbar .prodshow-header .prodshow-headline svg {
	width: 32px;
	height: 32px;
}

.prodshow-topbar .prodshow-header a {
	display: flex;
	align-items: center;
	font-size: clamp(14px, 1.5vw, 16px);
	font-weight: 500;
	margin-left: auto;
	text-decoration: none;
	color: #6f6f84;
	outline: none !important;
	box-shadow: none !important;
	gap: 6px;
}

.prodshow-topbar .prodshow-header a:hover,
.prodshow-topbar .prodshow-header a:active {
	color: #3a3a56;
}

/* Navigation Menu */
.prodshow-topbar .prodshow-menu {
	padding: 0 30px;
	background: #fff;
}

.prodshow-topbar .prodshow-menu nav {
	display: flex;
	flex-wrap: wrap;
	border-bottom: 1px solid #dadadf;
}

.prodshow-topbar .prodshow-menu nav a {
	padding: 20.5px 0 17.5px;
	text-decoration: none;
	font-size: 15px;
	line-height: 18px;
	color: #3a3a56;
	margin-right: 30px;
	outline: none;
	box-shadow: none;
	border-bottom: 3px solid rgba(0, 0, 0, 0);
	margin-bottom: -1px;
	transition: all 0.2s ease;
}

.prodshow-topbar .prodshow-menu nav a:hover {
	border-bottom: 3px solid #95BF46;
}

.prodshow-topbar .prodshow-menu nav a.active,
.prodshow-topbar .prodshow-menu nav a:focus {
	color: #09092c;
	font-weight: 500;
	border-color: #95BF46;
}

/* Form Section Styles */
#prodshow-settings .prodshow-section {
	background-color: #f9f9f9;
	border: 1px solid #e0e0e0;
	box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
	margin-top: 2rem;
	margin-bottom: 2rem;
}

#prodshow-settings .prodshow-section-header {
	padding: 1.2rem 1.5rem;
	border-bottom: 1px solid #e5e5e5;
	background: #fff;
}

#prodshow-settings .prodshow-section-header h2 {
	font-size: 1.2rem;
	font-weight: bold;
	color: #333333;
	margin: 0 0 0.5rem 0;
}

#prodshow-settings .prodshow-section-header p {
	font-size: 0.95rem;
	color: #666666;
	margin: 0;
	font-weight: normal;
}

/* Form table styles */
#prodshow-settings .form-table {
	margin: 0;
	background: #f9f9f9;
}

#prodshow-settings .form-table th {
	font-weight: 600;
	padding: 20px 10px 20px 20px;
	width: 200px;
	vertical-align: top;
	background-color: #f9f9f9;
	border-bottom: 1px solid #e5e5e5;
	font-size: 0.9125rem;
}

#prodshow-settings .form-table td {
	padding: 20px 20px 20px 10px;
	vertical-align: top;
	border-bottom: 1px solid #f0f0f0;
}

#prodshow-settings .form-table tr:last-child th,
#prodshow-settings .form-table tr:last-child td {
	border-bottom: none;
}

/* Field styles */
#prodshow-settings select,
#prodshow-settings input[type="text"],
#prodshow-settings input[type="password"] {
	width: 100%;
	max-width: 400px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

#prodshow-settings input[type="text"]:focus,
#prodshow-settings input[type="password"]:focus,
#prodshow-settings select:focus {
	border-color: #95BF46;
	box-shadow: 0 0 0 1px #95BF46;
	outline: 2px solid transparent;
}

/* Description style */
#prodshow-settings .description {
	font-style: italic;
	color: #666;
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.5;
}

#prodshow-settings .description a {
	color: #2271b1;
	text-decoration: none;
}

#prodshow-settings .description a:hover {
	text-decoration: underline;
}

/* Connection Status Card */
.prodshow-connection-status-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
	display: flex;
	gap: 16px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.2s ease;
}

.prodshow-connection-status-card:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.prodshow-connection-status-card.success {
	border-left: 4px solid #28a745;
}

.prodshow-connection-status-card.error {
	border-left: 4px solid #dc3545;
	padding: 20px;
	margin: 20px 0 !important;
}

.prodshow-status-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.prodshow-connection-status-card.success .prodshow-status-icon {
	background: #edfaef;
	color: #28a745;
}

.prodshow-connection-status-card.error .prodshow-status-icon {
	background: #fff5f5;
	color: #dc3545;
}

.prodshow-status-content {
	flex: 1;
	min-width: 0;
}

.prodshow-status-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	gap: 12px;
	flex-wrap: wrap;
}

.prodshow-status-header h3 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: #1e1e1e;
}

.prodshow-status-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.prodshow-connection-status-card.success .prodshow-status-badge {
	background: #edfaef;
	color: #28a745;
}

.prodshow-connection-status-card.error .prodshow-status-badge.error {
	background: #fff5f5;
	color: #dc3545;
}

.prodshow-status-details {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.prodshow-status-item {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.prodshow-status-label {
	font-weight: 600;
	color: #666;
	min-width: 100px;
	flex-shrink: 0;
}

.prodshow-status-value {
	color: #1e1e1e;
	word-break: break-word;
}

.prodshow-connection-status-card.error .prodshow-status-value {
	color: #dc3545;
}

.prodshow-auto-detected {
	font-size: 0.85em;
	color: #28a745;
	font-weight: normal;
}

.prodshow-fallback-version {
	font-size: 0.85em;
	color: #dc3545;
	font-weight: normal;
}

.prodshow-api-version-display {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

#prodshow-refresh-api-version {
	padding: 2px 6px;
	min-height: auto;
	line-height: 1;
}

#prodshow-refresh-api-version .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.prodshow-spin {
	animation: prodshow-spin 1s linear infinite;
}

@keyframes prodshow-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Info boxes */
.prodshow-info-box {
	background: #f0f6fc;
	border: 1px solid #c3d4e7;
	border-radius: 4px;
	padding: 15px;
	margin: 20px 0;
}

.prodshow-info-box h3 {
	margin-top: 0;
	color: #0073aa;
	font-size: 1rem;
}

.prodshow-info-box ol,
.prodshow-info-box ul {
	margin: 10px 0;
	padding-left: 20px;
}

.prodshow-info-box li {
	margin-bottom: 8px;
	line-height: 1.6;
}

/* Button Styles */
#prodshow-settings .button-primary,
#prodshow-settings .button-secondary {
	font-size: 14px;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	text-shadow: none;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	display: inline-block;
	line-height: 1.4;
}

/* Primary Button - Save Settings */
#prodshow-settings .button-primary {
	background-color: #384246;
	color: #ffffff;
	border: 2px solid #384246;
}

#prodshow-settings .button-primary:hover,
#prodshow-settings .button-primary:focus {
	background-color: #2a3135;
	border-color: #2a3135;
	color: #ffffff;
	box-shadow: 0 4px 8px rgba(56, 66, 70, 0.2);
	transform: translateY(-1px);
}

#prodshow-settings .button-primary:active {
	background-color: #1f2629;
	border-color: #1f2629;
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#prodshow-settings .button-primary:disabled {
	background-color: #7a8488;
	border-color: #7a8488;
	cursor: not-allowed;
	opacity: 0.6;
	transform: none;
	box-shadow: none;
}

/* Secondary Button - Clear Cache */
#prodshow-settings .button-secondary {
	background-color: #ffffff;
	color: #384246;
	border: 2px solid #384246;
}

#prodshow-settings .button-secondary:hover,
#prodshow-settings .button-secondary:focus {
	background-color: #384246;
	border-color: #384246;
	color: #ffffff;
	box-shadow: 0 4px 8px rgba(56, 66, 70, 0.2);
	transform: translateY(-1px);
}

#prodshow-settings .button-secondary:active {
	background-color: #2a3135;
	border-color: #2a3135;
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Save Button Container */
#prodshow-settings .prodshow-save-button-container {
	padding: 24px;
	text-align: center;
	margin-top: 0;
}

/* Legacy submit container support */
#prodshow-settings .submit {
	margin-top: 0;
	padding: 0;
	text-align: center;
	background: transparent;
}

/* Button Icons */
#prodshow-settings .button-primary::before {
	content: "✓";
	margin-right: 8px;
	font-weight: bold;
}

#prodshow-settings .prodshow-cache-section .button-secondary::before {
	content: "⟳";
	margin-right: 8px;
	font-size: 16px;
}

/* Responsive design */
@media screen and (max-width: 782px) {
	#prodshow-settings.wrap {
		padding: 0 15px;
		max-width: 100%;
	}
	
	/* Make buttons full width on mobile */
	#prodshow-settings .button-primary,
	#prodshow-settings .button-secondary,
	#prodshow-settings .button {
		width: 100%;
		max-width: 100%;
		text-align: center;
	}

	.prodshow-topbar .prodshow-header,
	.prodshow-topbar .prodshow-menu {
		padding: 15px 15px;
	}

	.prodshow-topbar .prodshow-header h1 {
		font-size: 1.1rem;
	}

	.prodshow-topbar .prodshow-header h1 svg {
		width: 24px;
		height: 24px;
	}

	.prodshow-topbar .prodshow-menu nav {
		gap: 10px;
	}

	.prodshow-topbar .prodshow-menu nav a {
		margin-right: 15px;
		font-size: 14px;
		padding: 15px 0 12px;
	}

	/* Section styles */
	#prodshow-settings .prodshow-section {
		margin-top: 1rem;
		margin-bottom: 1rem;
		border-radius: 0;
	}

	#prodshow-settings .prodshow-section-header {
		padding: 1rem;
	}

	#prodshow-settings .prodshow-section-header h2 {
		font-size: 1.1rem;
	}

	#prodshow-settings .prodshow-section-header p {
		font-size: 0.875rem;
	}

	/* Form table - stack layout */
	#prodshow-settings .form-table {
		width: 100%;
		display: block;
	}

	#prodshow-settings .form-table tbody,
	#prodshow-settings .form-table tr {
		display: block;
		width: 100%;
	}

	#prodshow-settings .form-table th,
	#prodshow-settings .form-table td {
		display: block;
		width: 100% !important;
		padding: 10px 15px;
		border: none;
	}

	#prodshow-settings .form-table th {
		padding-bottom: 8px;
		padding-top: 15px;
		font-size: 0.9rem;
	}

	#prodshow-settings .form-table td {
		padding-top: 0;
		padding-bottom: 15px;
	}

	#prodshow-settings .form-table tr {
		border-bottom: 1px solid #e5e5e5;
	}

	#prodshow-settings .form-table tr:last-child {
		border-bottom: none;
	}

	/* Input fields */
	#prodshow-settings select,
	#prodshow-settings input[type="text"],
	#prodshow-settings input[type="password"],
	#prodshow-settings .regular-text {
		max-width: 100%;
		width: 100%;
		font-size: 16px; /* Prevents zoom on iOS */
	}

	/* Description text */
	#prodshow-settings .form-table td .description {
		font-size: 0.875rem;
	}

	/* Connection status card responsive */
	.prodshow-connection-status-card {
		flex-direction: column;
		padding: 16px;
		margin: 1rem 0;
	}

	.prodshow-status-icon {
		width: 40px;
		height: 40px;
	}

	.prodshow-status-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.prodshow-status-header h3 {
		font-size: 1rem;
	}

	.prodshow-status-item {
		flex-direction: column;
		gap: 4px;
		align-items: flex-start;
	}

	.prodshow-status-label {
		min-width: auto;
		font-size: 0.875rem;
	}

	.prodshow-status-value {
		font-size: 0.875rem;
		word-break: break-all;
	}

	/* Info boxes */
	.prodshow-info-box {
		margin: 0 15px 15px 15px !important;
		padding: 12px !important;
	}

	.prodshow-info-box code {
		font-size: 11px !important;
		word-break: break-all;
		white-space: pre-wrap;
	}

	/* Save button container */
	.prodshow-save-button-container {
		padding: 15px;
	}

	/* Help section */
	.prodshow-help-section {
		padding: 1rem;
	}

	.prodshow-help-section h2 {
		font-size: 1.1rem;
	}

	.prodshow-help-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.prodshow-help-card {
		padding: 16px;
	}

	.prodshow-help-icon {
		font-size: 2rem;
	}

	.prodshow-help-card h3 {
		font-size: 1rem;
	}

	.prodshow-help-card p {
		font-size: 0.875rem;
	}

	/* Banner content */
	.prodshow-banner-content {
		padding: 15px;
	}

	.prodshow-steps li {
		font-size: 0.9rem;
		padding: 10px 0;
	}

	.prodshow-banner-links {
		flex-direction: column;
		gap: 10px;
	}

	.prodshow-banner-links a {
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
	#prodshow-settings.wrap {
		padding: 0 10px;
	}

	.prodshow-topbar .prodshow-header,
	.prodshow-topbar .prodshow-menu {
		padding: 12px 10px;
	}

	.prodshow-topbar .prodshow-header h1 {
		font-size: 1rem;
		gap: 0.5rem;
	}

	.prodshow-topbar .prodshow-menu nav a {
		margin-right: 10px;
		font-size: 13px;
	}

	#prodshow-settings .prodshow-section-header {
		padding: 0.875rem;
	}

	#prodshow-settings .form-table th,
	#prodshow-settings .form-table td {
		padding: 8px 12px;
	}

	.prodshow-info-box {
		margin: 0 10px 10px 10px !important;
		padding: 10px !important;
	}

	.prodshow-help-section {
		padding: 0.875rem;
	}
}

/* Mobile-first responsive styles */
@media (min-width: 600px) {
	.prodshow-connection-status-card {
		padding: 24px;
	}

	.prodshow-status-item {
		flex-direction: row;
	}
}

/* Cache Management Section */
.prodshow-cache-section {
	margin-top: 30px;
}

.prodshow-cache-section h2 {
	font-size: 1.1rem;
	margin-bottom: 10px;
}

.prodshow-cache-section p {
	color: #666;
	margin-bottom: 15px;
}

.prodshow-cache-form {
	padding: 24px;
	text-align: center;
	background: #f9f9f9;
}

/* Getting Started Banner */

.prodshow-banner-icon svg {
	width: 32px;
	height: 32px;
	color: white;
}

.prodshow-banner-content {
	flex: 1;
}

.prodshow-banner-content h2 {
	margin: 0 0 12px 0;
	font-size: 1.5rem;
	color: #333;
	font-weight: 600;
}

.prodshow-banner-content > p {
	margin: 0 0 20px 0;
	font-size: 1rem;
	color: #555;
	line-height: 1.6;
}

.prodshow-steps {
	border-radius: 6px;
	padding: 20px 20px 20px 40px;
	margin: 0;
}

.prodshow-steps li {
	margin-bottom: 16px;
	line-height: 1.6;
	color: #333;
}

.prodshow-steps li:last-child {
	margin-bottom: 0;
}

.prodshow-steps strong {
	display: block;
	font-size: 1.05rem;
	margin-bottom: 4px;
	color: #333;
}

.prodshow-steps p {
	margin: 0;
	color: #666;
	font-size: 0.95rem;
}

.prodshow-banner-links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.prodshow-link-primary,
.prodshow-link-secondary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
	font-size: 14px;
}

.prodshow-link-primary {
	background: white;
	color: #384246;
}

.prodshow-link-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
	color: #384246;
}

.prodshow-link-secondary {
	background: rgba(255, 255, 255, 0.2);
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.prodshow-link-secondary:hover {
	background: rgba(255, 255, 255, 0.3);
	color: white;
}

/* Help & Resources Section */
.prodshow-help-section {
	margin: 30px 0;
	padding: 24px;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.prodshow-help-section h2 {
	margin: 0 0 20px 0;
	font-size: 1.3rem;
	color: #333;
}

.prodshow-help-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
}

.prodshow-help-card {
	background: white;
	padding: 24px;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
	text-align: center;
	transition: all 0.2s ease;
}

.prodshow-help-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
	border-color: #384246;
}

.prodshow-help-icon {
	font-size: 2.5rem;
	margin-bottom: 12px;
}

.prodshow-help-card h3 {
	margin: 0 0 8px 0;
	font-size: 1.1rem;
	color: #333;
}

.prodshow-help-card p {
	margin: 0 0 16px 0;
	color: #666;
	font-size: 0.9rem;
	line-height: 1.5;
}

.prodshow-help-card a {
	display: inline-block;
	color: #384246;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: color 0.2s ease;
}

.prodshow-help-card a:hover {
	color: #2a3135;
}

/* Notices positioning */
#prodshow-settings .notice {
	margin: 20px 0 20px 0;
}

/* Hide page title as we have custom header */
.prodshow-settings-wrap > h1:first-of-type {
	display: none;
}

/* OAuth Section Styles */
#prodshow-oauth-section .required {
	color: #dc3545;
	font-weight: bold;
}

.prodshow-oauth-connected-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	background: #f0f9f0;
	border-top: 1px solid #e5e5e5;
}

.prodshow-oauth-status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #28a745;
}

.prodshow-oauth-status .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.prodshow-redirect-url-box {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f9f9f9;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	max-width: 100%;
	overflow-x: auto;
}

.prodshow-redirect-url-box code {
	background: transparent;
	padding: 0;
	font-size: 13px;
	word-break: break-all;
	flex: 1;
}

#prodshow-copy-redirect-url {
	flex-shrink: 0;
	padding: 4px 8px;
	min-height: auto;
	line-height: 1;
}

#prodshow-copy-redirect-url .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

#prodshow-copy-redirect-url.copied {
	background: #28a745;
	border-color: #28a745;
	color: #fff;
}

.prodshow-oauth-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 24px;
	background: #f9f9f9;
	border-top: 1px solid #e5e5e5;
}

.prodshow-connect-button {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	padding: 14px 28px !important;
	font-size: 15px !important;
	background: #95BF46 !important;
	border-color: #95BF46 !important;
}

.prodshow-connect-button::before {
	content: none !important;
}

.prodshow-connect-button:hover,
.prodshow-connect-button:focus {
	background: #7aa93a !important;
	border-color: #7aa93a !important;
}

.prodshow-connect-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.prodshow-connect-button svg {
	flex-shrink: 0;
}

.prodshow-oauth-spinner {
	float: none !important;
	margin: 0 !important;
}

/* Responsive adjustments for OAuth */
@media screen and (max-width: 782px) {
	.prodshow-oauth-connected-info {
		flex-direction: column;
		gap: 16px;
		text-align: center;
	}

	.prodshow-redirect-url-box {
		flex-direction: column;
		align-items: stretch;
	}

	.prodshow-redirect-url-box code {
		text-align: center;
	}

	#prodshow-copy-redirect-url {
		width: 100%;
	}

	.prodshow-oauth-actions {
		flex-direction: column;
	}

	.prodshow-connect-button {
		width: 100%;
		justify-content: center;
	}
}
