/* ==========================================================================
   1. MENU TOOLTIP — popover anchored to sidebar menu item
   ========================================================================== */

.mpd-menu-tooltip {
	position: fixed;
	z-index: 100060;
	width: 360px;
	max-height: calc(100vh - 20px);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
	animation: mpdPopIn .4s cubic-bezier(.22, 1, .36, 1);
	transition: top .15s ease-out;
}

/* Left-pointing arrow */
.mpd-menu-tooltip__arrow {
	position: absolute;
	top: 46px;
	left: -8px;
	width: 16px;
	height: 16px;
	background: #3b6cf5;
	transform: rotate(45deg);
	border-radius: 2px;
	z-index: -1;
}

/* Blue header band */
.mpd-menu-tooltip__header {
	background: linear-gradient(135deg, #3b6cf5 0%, #1e40af 100%);
	border-radius: 10px 10px 0 0;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
}

.mpd-menu-tooltip__icon {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .2);
	border-radius: 8px;
	flex-shrink: 0;
}

.mpd-menu-tooltip__icon svg {
	stroke: #fff;
}

.mpd-menu-tooltip__header strong {
	font-size: 14.5px;
	color: #fff;
	font-weight: 600;
	line-height: 1.3;
}

/* Body */
.mpd-menu-tooltip__body {
	padding: 16px 20px 18px;
}

.mpd-menu-tooltip__body p {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.6;
	color: #555;
}

.mpd-menu-tooltip__body a:not(.mpd-menu-tooltip__gotit) {
	color: #2563eb;
	text-decoration: none;
	font-weight: 500;
}

.mpd-menu-tooltip__body a:not(.mpd-menu-tooltip__gotit):hover {
	text-decoration: underline;
}

.mpd-menu-tooltip__gotit {
	display: inline-block;
	padding: 8px 26px;
	background: #2563eb;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	border-radius: 5px;
	text-decoration: none !important;
	transition: background .2s, transform .2s, box-shadow .2s;
	cursor: pointer;
}

.mpd-menu-tooltip__gotit:hover {
	background: #1e40af;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

/* Dismiss link at bottom-right */
.mpd-menu-tooltip__dismiss {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 3px;
	background: none;
	border: none;
	cursor: pointer;
	color: #999;
	font-size: 12.5px;
	padding: 4px 20px 14px;
	transition: color .2s;
	position: absolute;
    bottom: 10px;
    right: 10px;
}

.mpd-menu-tooltip__dismiss:hover {
	color: #2563eb;
}

.mpd-menu-tooltip__dismiss .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
}

/* Animations */
.mpd-menu-tooltip--out {
	animation: mpdPopOut .3s ease-in forwards;
}

@keyframes mpdPopIn {
	from { opacity: 0; transform: translateX(-12px) scale(.95); }
	to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes mpdPopOut {
	from { opacity: 1; transform: scale(1); }
	to   { opacity: 0; transform: translateX(-10px) scale(.95); }
}

@media (max-width: 782px) {
	/* On mobile / collapsed sidebar, hide tooltip */
	.mpd-menu-tooltip { display: none !important; }
}


/* ==========================================================================
   2. PRO SALES NOTICE — white, animated, coupon urgency
   ========================================================================== */

.mpd-pro-notice {
	position: relative;
	border: none !important;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .04);
	padding: 0 !important;
	margin: 16px 0;
	overflow: hidden;
	animation: mpdFadeUp .5s cubic-bezier(.22, 1, .36, 1);
}

.mpd-pro-notice__shimmer {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #e11d48, #f59e0b, #e11d48);
	background-size: 200% 100%;
	animation: mpdShimmer 2.5s linear infinite;
}

@keyframes mpdShimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@keyframes mpdFadeUp {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}

.mpd-pro-notice__inner {
	padding: 22px 28px 24px;
}

/* Main row — badge + headline */
.mpd-pro-notice__main {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
}

.mpd-pro-notice__badge {
	background: linear-gradient(135deg, #e11d48, #be123c);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.2px;
	padding: 6px 14px;
	border-radius: 6px;
	flex-shrink: 0;
	text-transform: uppercase;
	animation: mpdBadgePulse 2s ease-in-out infinite;
}

@keyframes mpdBadgePulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .4); }
	50%      { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
}

.mpd-pro-notice__text h3 {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #1e1e1e;
}

.mpd-pro-notice__text p {
	margin: 0;
	font-size: 13.5px;
	color: #666;
	line-height: 1.5;
}

/* Features grid */
.mpd-pro-notice__features {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px 16px;
	margin-bottom: 18px;
	padding: 14px 18px;
	background: #fafafa;
	border-radius: 8px;
	border: 1px solid #f0f0f0;
}

.mpd-pro-notice__features span {
	font-size: 12.5px;
	color: #444;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Coupon + CTA row */
.mpd-pro-notice__action-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.mpd-pro-notice__coupon {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.mpd-pro-notice__coupon-tag {
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .8px;
	padding: 4px 10px;
	border-radius: 4px;
	white-space: nowrap;
	text-transform: uppercase;
	animation: mpdTagPulse 2.5s ease-in-out infinite;
}

@keyframes mpdTagPulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.04); }
}

.mpd-pro-notice__coupon-text {
	font-size: 13px;
	color: #444;
	line-height: 1.4;
}

.mpd-pro-notice__coupon-text strong {
	color: #e11d48;
	font-size: 15px;
}

.mpd-pro-notice__code {
	background: linear-gradient(135deg, #fef3c7, #fde68a);
	color: #92400e;
	font-family: monospace;
	font-size: 13px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
	border: 1px dashed #d97706;
	letter-spacing: .5px;
}

/* CTA buttons */
.mpd-pro-notice__ctas {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.mpd-pro-notice__btn {
	display: inline-flex;
	align-items: center;
	padding: 10px 22px;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all .25s cubic-bezier(.22, 1, .36, 1);
	white-space: nowrap;
	cursor: pointer;
	border: none;
	line-height: 1.4;
	position: relative;
	overflow: hidden;
}

.mpd-pro-notice__btn--buy {
	background: linear-gradient(135deg, #e11d48, #be123c);
	color: #fff !important;
	box-shadow: 0 3px 14px rgba(225, 29, 72, .3);
}

/* shine sweep */
.mpd-pro-notice__btn--buy::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
	animation: mpdShineSweep 3s ease-in-out infinite;
}

@keyframes mpdShineSweep {
	0%   { left: -100%; }
	40%  { left: 100%; }
	100% { left: 100%; }
}

.mpd-pro-notice__btn--buy:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(225, 29, 72, .4);
	background: linear-gradient(135deg, #be123c, #9f1239);
}

.mpd-pro-notice__btn--plan {
	color: #e11d48 !important;
	border: 1.5px solid #e11d48;
	background: transparent;
}

.mpd-pro-notice__btn--plan:hover {
	background: #fef2f2;
	transform: translateY(-1px);
}

/* Close button */
.mpd-pro-notice__close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 22px;
	color: #bbb;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	transition: color .2s, transform .2s;
	z-index: 2;
}

.mpd-pro-notice__close:hover {
	color: #e11d48;
	transform: scale(1.15);
}

/* Out animation */
.mpd-pro-notice--out {
	animation: mpdSlideOut .35s ease-in forwards;
}

/* Responsive */
@media (max-width: 960px) {
	.mpd-pro-notice__features {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 782px) {
	.mpd-pro-notice__main {
		flex-direction: column;
	}
	.mpd-pro-notice__features {
		grid-template-columns: 1fr 1fr;
	}
	.mpd-pro-notice__action-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.mpd-pro-notice__ctas {
		width: 100%;
	}
	.mpd-pro-notice__btn {
		flex: 1;
		justify-content: center;
	}
}

/* Plugin Suggestion Notice Styles */
.mpd-plugin-suggestion {
    border: none !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    padding: 20px;
    border-radius: 12px;
    margin: 16px 0;
    position: relative;
    overflow: hidden;
    animation: slideInFade 0.5s ease-out;
}

.mpd-plugin-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #0073aa, #005177);
    animation: shimmer 2s infinite;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.mpd-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.mpd-notice-icon {
    flex: 0 0 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007cba, #0073aa);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.mpd-notice-text {
    flex: 1;
    padding-top: 2px;
}

.mpd-notice-text h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    background: linear-gradient(135deg, #007cba, #005177);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mpd-notice-text p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    color: #50575e;
    font-size: 14px;
}

.mpd-notice-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Enhanced Button Styles */
.mpd-notice-actions .button {
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    min-width: 120px;
    text-align: center;
}

/* Install/Activate Button Styles */
.mpd-install-plugin, .mpd-activate-plugin {
    background: linear-gradient(135deg, #007cba 0%, #005177 100%) !important;
    color: white !important;
    border: 2px solid transparent !important;
    box-shadow: 0 3px 12px rgba(0, 124, 186, 0.3);
    position: relative;
}

.mpd-install-plugin::before, .mpd-activate-plugin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.mpd-install-plugin:hover, .mpd-activate-plugin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.mpd-install-plugin:hover::before, .mpd-activate-plugin:hover::before {
    left: 100%;
}

.mpd-install-plugin:active, .mpd-activate-plugin:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

/* Disabled state for buttons */
.mpd-install-plugin:disabled, .mpd-activate-plugin:disabled {
    background: linear-gradient(135deg, #8c8f94 0%, #72777c 100%) !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(140, 143, 148, 0.2);
}

.mpd-install-plugin:disabled:hover, .mpd-activate-plugin:disabled:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(140, 143, 148, 0.2);
}

/* Success state */
.button-secondary.mpd-install-plugin, .button-secondary.mpd-activate-plugin {
    background: linear-gradient(135deg, #00a32a 0%, #007d1f 100%) !important;
    color: white !important;
    box-shadow: 0 3px 12px rgba(0, 163, 42, 0.3);
}

/* Dismiss Button */
.mpd-dismiss-suggestion {
    background: #f6f7f7 !important;
    color: #50575e !important;
    border: 2px solid #dcdcde !important;
}

.mpd-dismiss-suggestion:hover {
    background: #f0f0f1 !important;
    color: #1d2327 !important;
    border-color: #8c8f94 !important;
    transform: translateY(-1px);
}

/* Loading animation for buttons */
.mpd-install-plugin.loading, .mpd-activate-plugin.loading {
    position: relative;
    color: transparent !important;
}

.mpd-install-plugin.loading::after, .mpd-activate-plugin.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notice dismiss animation */
.mpd-plugin-suggestion.dismissing {
    animation: slideOutFade 0.3s ease-in forwards;
}

@keyframes slideOutFade {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

@media (max-width: 768px) {
    .mpd-notice-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .mpd-notice-icon {
        align-self: center;
    }
    
    .mpd-notice-actions {
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }
    
    .mpd-notice-actions .button {
        width: 100%;
        max-width: 200px;
    }
}

