/* 
* MPD Popover and Tooltip Styles
* Custom popover and tooltip implementation
*/

/* ==========================================================================
   Popover Base Styles
   ========================================================================== */

.mpd-popover {
    position: absolute;
    color: #000;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    z-index: 1060;
    max-width: 276px;
    word-wrap: break-word;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    pointer-events: none;
}

.mpd-popover.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Popover Arrow */
.mpd-popover .popover-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 5px solid transparent;
}

.mpd-popover.top .popover-arrow {
    bottom: -10px;
    left: 50%;
    margin-left: -5px;
    border-top-color: #ccc;
    border-bottom: 0;
}

.mpd-popover.bottom .popover-arrow {
    top: -10px;
    left: 50%;
    margin-left: -5px;
    border-bottom-color: #ccc;
    border-top: 0;
}

.mpd-popover.left .popover-arrow {
    right: -10px;
    top: 50%;
    margin-top: -5px;
    border-left-color: #ccc;
    border-right: 0;
}

.mpd-popover.right .popover-arrow {
    left: -10px;
    top: 50%;
    margin-top: -5px;
    border-right-color: #ccc;
    border-left: 0;
}

/* ==========================================================================
   Tooltip Base Styles
   ========================================================================== */

.mpd-tooltip {
    position: absolute;
    background: #000;
    color: #fff;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.4;
    z-index: 1070;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    pointer-events: none;
    white-space: nowrap;
}

.mpd-tooltip.show {
    opacity: 1;
    transform: scale(1);
}

/* Tooltip Arrow */
.mpd-tooltip .tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 4px solid transparent;
}

.mpd-tooltip.top .tooltip-arrow {
    bottom: -8px;
    left: 50%;
    margin-left: -4px;
    border-top-color: #000;
    border-bottom: 0;
}

.mpd-tooltip.bottom .tooltip-arrow {
    top: -8px;
    left: 50%;
    margin-left: -4px;
    border-bottom-color: #000;
    border-top: 0;
}

.mpd-tooltip.left .tooltip-arrow {
    right: -8px;
    top: 50%;
    margin-top: -4px;
    border-left-color: #000;
    border-right: 0;
}

.mpd-tooltip.right .tooltip-arrow {
    left: -8px;
    top: 50%;
    margin-top: -4px;
    border-right-color: #000;
    border-left: 0;
}

/* ==========================================================================
   Popover Content Styles
   ========================================================================== */

.mpd-popover .social-share {
    margin: 0;
}

.mpd-popover .social-share ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
}

.mpd-popover .social-share ul li {
    display: inline-block;
    list-style: none;
}

.mpd-popover .social-share ul li a {
    display: block;
    padding: 5px;
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    transition: background-color 0.2s;
}

.mpd-popover .social-share ul li a:hover {
    background-color: #f0f0f0;
}

.mpd-popover .social-share ul li a i {
    margin-right: 5px;
}

/* QR Code styling */
.mpd-popover .qrcode {
    display: block;
    margin: 0 auto;
    max-width: 100px;
    height: auto;
}

/* Like button styling */
.mpd-popover .xblog-like {
    text-align: center;
}

/* ==========================================================================
   Advanced Icons Styles
   ========================================================================== */

.mpd-adicons.mpd-advacene-icons {
    position: relative;
}

.mpd-adicons.mpd-advacene-icons li {
    position: relative;
}

.mpd-adicons.mpd-advacene-icons li p {
    cursor: pointer;
    transition: all 0.3s ease;
}

.mpd-adicons.mpd-advacene-icons li p:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .mpd-popover {
        max-width: 250px;
        font-size: 12px;
    }
    
    .mpd-tooltip {
        font-size: 11px;
    }
    
    .mpd-popover .social-share ul {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .mpd-popover .social-share ul li a {
        padding: 3px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Animation Styles
   ========================================================================== */

.mpd-popover.show,
.mpd-tooltip.show {
    animation: mpdFadeInScale 0.15s ease-out;
}

@keyframes mpdFadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   Accessibility - High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    .mpd-popover {
        border-width: 2px;
        border-color: #000;
    }
    
    .mpd-tooltip {
        border: 1px solid #fff;
    }
}

/* ==========================================================================
   Social Share Buttons with SVG Icons
   ========================================================================== */

.mpd-social-share {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mpd-social-share li {
    list-style: none;
    display: inline-block;
}

.mpd-social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mpd-social-share a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mpd-share-facebook {
    color: #1877f2;
}

.mpd-share-facebook:hover {
    color: #166fe5;
    transform: scale(1.2);
}

.mpd-share-x {
    color: #000000;
}

.mpd-share-x:hover {
    color: #333333;
    transform: scale(1.2);
}

.mpd-share-linkedin {
    color: #0077b5;
}

.mpd-share-linkedin:hover {
    color: #006399;
    transform: scale(1.2);
}

.mpd-share-whatsapp {
    color: #25D366;
}

.mpd-share-instagram:hover {
    color: #c13584;
    transform: scale(1.2);
}

.mpd-share-pinterest {
    color: #bd081c;
}

.mpd-share-pinterest:hover {
    color: #a00718;
    transform: scale(1.2);
}