/**
 * ShopPanel Admin Styles
 * Modern Shopify-inspired design
 */

/* Reset and Base Styles */
.shoppanel-dashboard {
	padding: 20px 0;
	max-width: 1400px;
}

.shoppanel-dashboard-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e1e8ed;
}

.shoppanel-dashboard-header h1 {
	font-size: 32px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 8px 0;
}

.shoppanel-dashboard-header p {
	font-size: 16px;
	color: #6b7280;
	margin: 0;
}

/* Stats Grid */
.shoppanel-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

.shoppanel-stat-card {
	background: #ffffff;
	border: 1px solid #e1e8ed;
	border-radius: 8px;
	padding: 24px;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shoppanel-stat-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.shoppanel-stat-icon {
	width: 48px;
	height: 48px;
	background: #f0f4f8;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.shoppanel-stat-icon .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #4a5568;
}

.shoppanel-stat-content {
	flex: 1;
}

.shoppanel-stat-content h3 {
	font-size: 14px;
	font-weight: 500;
	color: #6b7280;
	margin: 0 0 8px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.shoppanel-stat-value {
	font-size: 28px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 4px 0;
	line-height: 1.2;
}

.shoppanel-stat-label {
	font-size: 14px;
	color: #6b7280;
	margin: 0;
}

.shoppanel-stat-label a {
	color: #0066cc;
	text-decoration: none;
}

.shoppanel-stat-label a:hover {
	text-decoration: underline;
}

/* Quick Actions */
.shoppanel-quick-actions {
	margin-top: 40px;
}

.shoppanel-quick-actions h2 {
	font-size: 20px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 20px 0;
}

.shoppanel-quick-actions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.shoppanel-quick-action {
	background: #ffffff;
	border: 1px solid #e1e8ed;
	border-radius: 8px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: #1a1a1a;
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shoppanel-quick-action:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
	border-color: #0066cc;
	color: #0066cc;
}

.shoppanel-quick-action .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #0066cc;
}

.shoppanel-quick-action:hover .dashicons {
	color: #0066cc;
}

/* Custom ShopPanel Menu Styles */
#shoppanel-custom-menu-wrapper,
#shoppanel-custom-menu {
	position: fixed;
	left: 0;
	top: 32px;
	bottom: 0;
	width: 260px;
	z-index: 9990;
}

#shoppanel-custom-menu {
	background: #1a1a1a;
	overflow-y: auto;
	overflow-x: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 32px);
}

.shoppanel-menu-header {
	background: #1a1a1a;
	padding: 16px;
	border-bottom: 1px solid #2d2d2d;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.shoppanel-menu-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #ffffff;
	font-weight: 600;
	font-size: 16px;
}

.shoppanel-menu-logo .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #ffffff;
}

.shoppanel-menu-title-wrapper {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.shoppanel-menu-title {
	color: #ffffff;
	font-weight: 600;
	line-height: 1.2;
}

.shoppanel-menu-subtitle {
	color: #9ca3af;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.2;
}

.shoppanel-menu-settings-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: #a7aaad;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.shoppanel-menu-settings-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #a7aaad;
}

.shoppanel-menu-settings-icon:hover {
	background: #2d2d2d;
	color: #ffffff;
}

.shoppanel-menu-settings-icon:hover .dashicons {
	color: #ffffff;
}

.shoppanel-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	overflow-y: auto;
	min-height: 0;
}

.shoppanel-menu-item {
	margin: 0;
	border-bottom: 1px solid #2d2d2d;
}

.shoppanel-menu-link {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	color: #ffffff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 300;
	transition: all 0.2s ease;
	position: relative;
}

.shoppanel-menu-link:hover {
	background: #2d2d2d;
	color: #ffffff;
}

.shoppanel-menu-item.active > .shoppanel-menu-link {
	background: #2d2d2d;
	color: #ffffff;
}

.shoppanel-menu-icon {
	font-size: 20px;
	width: 20px;
	height: 20px;
	margin-right: 12px;
	flex-shrink: 0;
	color: #a7aaad;
}

.shoppanel-menu-item.active .shoppanel-menu-icon,
.shoppanel-menu-link:hover .shoppanel-menu-icon {
	color: #ffffff;
}

.shoppanel-menu-text {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.shoppanel-menu-badge {
	background: #ef4444;
	color: #ffffff;
	border-radius: 10px;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	margin-left: auto;
}

.shoppanel-menu-arrow {
	font-size: 16px;
	width: 16px;
	height: 16px;
	margin-left: auto;
	color: #a7aaad;
	transition: transform 0.2s ease;
}

.shoppanel-menu-item-has-submenu.active .shoppanel-menu-arrow {
	transform: rotate(180deg);
}

.shoppanel-submenu {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #2d2d2d;
	display: none;
}

.shoppanel-menu-item-has-submenu.active .shoppanel-submenu {
	display: block;
}

.shoppanel-submenu-item {
	margin: 0;
	border-bottom: 1px solid #3d3d3d;
}

.shoppanel-submenu-item a {
	display: block;
	padding: 8px 16px 8px 48px;
	color: #b0b0b0;
	text-decoration: none;
	font-size: 13px;
	font-weight: 200;
	transition: all 0.2s ease;
}

.shoppanel-submenu-item a:hover,
.shoppanel-submenu-item.active a {
	color: #ffffff;
	background: #3d3d3d;
}

/* Menu Footer */
.shoppanel-menu-footer {
	padding: 16px 16px 30px 16px;
	margin-top: auto;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}

.shoppanel-menu-feedback-link {
	display: block !important;
	color: #a7aaad !important;
	text-decoration: none !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	text-align: center !important;
	transition: color 0.2s ease;
	opacity: 1 !important;
	visibility: visible !important;
	line-height: 1.5 !important;
}

.shoppanel-menu-feedback-link:hover {
	color: #d1d5db !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

/* Fix main content when custom menu is active */
body:not(.folded) #wpcontent {
	margin-left: 260px !important;
}

/* Sidebar Styles */
#adminmenuback,
#adminmenuwrap {
	background: #1a1a1a !important;
	width: 260px !important;
}

#adminmenu,
#adminmenu .wp-submenu {
	width: 260px !important;
}

#wpcontent, #wpfooter {
    margin-left: 260px !important;
}

/* WooCommerce Layout Header Adjustment */
.woocommerce-layout__header .woocommerce-layout__header-wrapper {
	width: calc(100% - 100px);
}

#adminmenu,
#adminmenu li {
	background: #1a1a1a !important;
}

#adminmenu {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

#adminmenu li {
	margin: 0 !important;
	border-bottom: 1px solid #2d2d2d !important;
}

#adminmenu a {
	color: #ffffff !important;
	padding: 0 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	display: block !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

#adminmenu div.wp-menu-name {
	padding: 12px 16px 12px 48px !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	word-break: normal !important;
	hyphens: none !important;
	overflow-wrap: normal !important;
	word-wrap: normal !important;
}

#adminmenu div.wp-menu-image {
	width: 48px !important;
	height: auto !important;
	padding: 12px 0 !important;
	position: absolute !important;
	left: 0 !important;
	text-align: center !important;
}

#adminmenu div.wp-menu-image:before {
	font-size: 20px !important;
	width: 20px !important;
	height: 20px !important;
	line-height: 1 !important;
	color: #a7aaad !important;
}

#adminmenu li:hover div.wp-menu-image:before,
#adminmenu li a:focus div.wp-menu-image:before,
#adminmenu li.opensub div.wp-menu-image:before {
	color: #72aee6 !important;
}

#adminmenu li.current div.wp-menu-image:before,
#adminmenu li.wp-has-current-submenu div.wp-menu-image:before {
	color: #ffffff !important;
}

#adminmenu a:hover,
#adminmenu li.current > a,
#adminmenu li.wp-has-current-submenu > a {
	background: #2d2d2d !important;
	color: #ffffff !important;
}

#adminmenu .wp-submenu {
	background: #2d2d2d !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 260px !important;
}

#adminmenu .wp-submenu li {
	border-bottom: 1px solid #3d3d3d !important;
	margin: 0 !important;
}

#adminmenu .wp-submenu a {
	color: #b0b0b0 !important;
	padding: 10px 16px 10px 48px !important;
	font-size: 14px !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	word-break: normal !important;
	hyphens: none !important;
}

#adminmenu .wp-submenu a:hover {
	color: #ffffff !important;
	background: #3d3d3d !important;
}

#adminmenu .dashicons {
	font-size: 20px !important;
	width: 20px !important;
	height: 20px !important;
	flex-shrink: 0 !important;
}

#adminmenu .awaiting-mod {
	background: #ef4444 !important;
	color: #ffffff !important;
	border-radius: 10px !important;
	padding: 2px 8px !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	margin-left: auto !important;
	position: absolute !important;
	right: 16px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
}

/* Fix for main content margin */
#wpcontent {
	margin-left: 260px !important;
	background: #f7f9fc;
	padding-left: 0 !important;
}

/* Header Styles */
#wpadminbar {
	background: #2d2d2d !important;
	border-bottom: 1px solid #3d3d3d;
}

#wpadminbar .ab-item,
#wpadminbar a.ab-item {
	color: #ffffff !important;
}

#wpadminbar .ab-item:hover,
#wpadminbar a.ab-item:hover {
	background: #3d3d3d !important;
	color: #ffffff !important;
}

/* Make "Próximamente" text black */
#wpadminbar a.ab-item[href*="site-visibility"] {
	color: #000000 !important;
}

#wpadminbar a.ab-item[href*="site-visibility"]:hover {
	color: #000000 !important;
}

#wpbody-content {
	padding: 20px;
}

/* Tables */
.wp-list-table {
	background: #ffffff;
	border: 1px solid #e1e8ed;
	border-radius: 8px;
	overflow: hidden;
}

.wp-list-table thead th {
	background: #f7f9fc;
	border-bottom: 1px solid #e1e8ed;
	padding: 12px;
	font-weight: 600;
	color: #1a1a1a;
}

.wp-list-table tbody td {
	padding: 12px;
	border-bottom: 1px solid #f0f4f8;
}

.wp-list-table tbody tr:hover {
	background: #f7f9fc;
}

/* Buttons - preserve WordPress default styles */
.wp-core-ui .button,
.wp-core-ui .button-secondary,
.wp-core-ui input[type="button"],
.wp-core-ui input[type="submit"],
.wp-core-ui input[type="reset"],
.button,
.button-secondary,
input[type="button"],
input[type="submit"],
input[type="reset"] {
	display: inline-block !important;
	text-decoration: none !important;
	font-size: 13px !important;
	line-height: 2.15384615 !important; /* 28px */
	min-height: 30px !important;
	margin: 0 !important;
	padding: 0 10px !important;
	cursor: pointer !important;
	border-width: 1px !important;
	border-style: solid !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	border-radius: 3px !important;
	white-space: nowrap !important;
	box-sizing: border-box !important;
	vertical-align: top !important;
}

.wp-core-ui .button,
.wp-core-ui .button-secondary,
.button,
.button-secondary {
	color: #2271b1 !important;
	border-color: #2271b1 !important;
	background: #f6f7f7 !important;
}

.wp-core-ui .button:hover,
.wp-core-ui .button-secondary:hover,
.button:hover,
.button-secondary:hover {
	background: #f0f0f1 !important;
	border-color: #0a4b78 !important;
	color: #0a4b78 !important;
}

.wp-core-ui .button:focus,
.wp-core-ui .button-secondary:focus,
.button:focus,
.button-secondary:focus {
	background: #f6f7f7 !important;
	border-color: #3582c4 !important;
	color: #0a4b78 !important;
	box-shadow: 0 0 0 1px #3582c4 !important;
	outline: 2px solid transparent !important;
	outline-offset: 0 !important;
}

.wp-core-ui .button-primary,
.button-primary {
	background: #2271b1 !important;
	border-color: #2271b1 !important;
	color: #ffffff !important;
	text-shadow: none !important;
}

.wp-core-ui .button-primary:hover,
.button-primary:hover {
	background: #135e96 !important;
	border-color: #135e96 !important;
	color: #ffffff !important;
}

.wp-core-ui .button-primary:focus,
.button-primary:focus {
	background: #2271b1 !important;
	border-color: #2271b1 !important;
	color: #ffffff !important;
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1 !important;
}

.wp-core-ui .button-primary:active,
.button-primary:active {
	background: #0a4b78 !important;
	border-color: #0a4b78 !important;
	color: #ffffff !important;
	box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5) !important;
}

/* Forms */
.form-table th {
	padding: 16px 0;
	font-weight: 600;
	color: #1a1a1a;
}

.form-table td {
	padding: 16px 0;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
textarea {
	border: 1px solid #e1e8ed !important;
	border-radius: 6px !important;
	padding: 8px 12px !important;
	font-size: 14px !important;
	transition: all 0.2s ease !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
	border-color: #0066cc !important;
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1) !important;
	outline: none !important;
}

/* Select styles - preserve WordPress default styles */
.wp-core-ui select,
select {
	border: 1px solid #8c8f94 !important;
	border-radius: 3px !important;
	font-size: 14px !important;
	line-height: 2 !important;
	color: #2c3338 !important;
	padding: 0 24px 0 8px !important;
	min-height: 30px !important;
	max-width: 25rem !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55% !important;
	background-size: 16px 16px !important;
	cursor: pointer !important;
	vertical-align: middle !important;
	transition: border-color 0.2s ease !important;
}

.wp-core-ui select:hover,
select:hover {
	color: #2271b1 !important;
}

.wp-core-ui select:focus,
select:focus {
	border-color: #2271b1 !important;
	color: #0a4b78 !important;
	box-shadow: 0 0 0 1px #2271b1 !important;
	outline: none !important;
}

.wp-core-ui select:disabled,
select:disabled {
	color: #a7aaad !important;
	border-color: #dcdcde !important;
	background-color: #f6f7f7 !important;
	background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23a0a5aa%22%2F%3E%3C%2Fsvg%3E') !important;
	cursor: default !important;
}

/* Notices */
.notice {
	border-left: 4px solid #0066cc !important;
	border-radius: 6px !important;
	padding: 12px 16px !important;
	margin: 20px 0 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.notice-success {
	border-left-color: #10b981 !important;
	background: #f0fdf4 !important;
}

.notice-error {
	border-left-color: #ef4444 !important;
	background: #fef2f2 !important;
}

.notice-warning {
	border-left-color: #f59e0b !important;
	background: #fffbeb !important;
}

/* Responsive */
@media (max-width: 782px) {
	.shoppanel-stats-grid {
		grid-template-columns: 1fr;
	}

	.shoppanel-quick-actions-grid {
		grid-template-columns: 1fr;
	}

	#adminmenu {
		width: 100% !important;
	}

	#wpcontent {
		margin-left: 0 !important;
	}
}

/* Loading States */
.shoppanel-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Footer Styles */
#footer-thankyou {
	display: none;
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.shoppanel-stat-card,
.shoppanel-quick-action {
	animation: fadeIn 0.3s ease-out;
}

/* Settings Page Styles */
.shoppanel-settings-wrap {
	max-width: 800px;
}

.shoppanel-settings-section {
	background: #ffffff;
	border: 1px solid #e1e8ed;
	border-radius: 8px;
	padding: 24px;
	margin: 20px 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shoppanel-settings-section-title {
	font-size: 20px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 12px 0;
	padding-bottom: 12px;
	border-bottom: 1px solid #e1e8ed;
}

/* More/Feedback Page */
.shoppanel-more-page {
	padding: 20px 0;
	max-width: 1400px;
}

.shoppanel-more-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e1e8ed;
}

.shoppanel-more-header h1 {
	font-size: 32px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0;
}

.shoppanel-more-content {
	background: #ffffff;
	border: 1px solid #e1e8ed;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shoppanel-more-section {
	margin-bottom: 30px;
}

.shoppanel-more-section:last-child {
	margin-bottom: 0;
}

.shoppanel-more-section h2 {
	font-size: 20px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 12px 0;
	padding-bottom: 12px;
	border-bottom: 1px solid #e1e8ed;
}

.shoppanel-more-section p {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.6;
	margin: 0 0 12px 0;
}

.shoppanel-more-section p:last-child {
	margin-bottom: 0;
}

