/*
 * My Contact Links Plugin Stylesheet
 */

/* === NEW: Animation for the icon to fade in === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Icon Wrapper - Positioning is now handled by an inline style */
.mcl-floating-icon-wrapper {
    position: fixed;
    bottom: 25px;
    z-index: 1000;
    /* === NEW: Add animation with a 1-second delay === */
    opacity: 0; /* Start hidden */
    animation: fadeInUp 0.5s ease-out 1s forwards; /* animation-name, duration, easing, delay, fill-mode */
}

/* Floating WhatsApp Icon - Now the positioning context for the tooltip */
.mcl-floating-icon {
    width: 60px;
    height: 60px;
    background-color: #25D366; /* Official WhatsApp Green */
    color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease-in-out;
    
    /* Center the Font Awesome icon */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;

    /* === Make this the positioning context for the tooltip === */
    position: relative; 
}

.mcl-floating-icon:hover {
    transform: scale(1.1);
    color: #FFFFFF;
}

/* === REVISED: Tooltip is now positioned relative to the icon === */
.mcl-tooltip {
    position: absolute; 
    top: 50%;
    transform: translateY(-50%);
    background-color: #FFFFFF;
    color: #25D366; /* Green text */
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    display: flex;
    align-items: center;
    
    /* Hide by default and add transition */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    z-index: 1002; /* Ensure tooltip is above icon content */
}

/* Show tooltip on icon hover */
.mcl-floating-icon:hover .mcl-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Tooltip position for RIGHT icon */
.mcl-position-right .mcl-tooltip {
    right: calc(100% + 15px); /* Position to the left of the icon */
}

/* Tooltip position for LEFT icon */
.mcl-position-left .mcl-tooltip {
    left: calc(100% + 15px); /* Position to the right of the icon */
}

/* Tooltip Arrow for RIGHT icon */
.mcl-position-right .mcl-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%; /* Attach to the right side of the tooltip */
    margin-top: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #FFFFFF; /* Arrow pointing right */
}

/* Tooltip Arrow for LEFT icon */
.mcl-position-left .mcl-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%; /* Attach to the left side of the tooltip */
    margin-top: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent #FFFFFF transparent transparent; /* Arrow pointing left */
}


/* Tooltip Close Button */
.mcl-tooltip-close {
    cursor: pointer;
    margin-right: 8px;
    font-size: 20px;
    font-weight: normal;
    color: #999;
    line-height: 1;
}

.mcl-tooltip-close:hover {
    color: #333;
}


/*
 * FIX FOR MISSING FONT AWESOME ICON
*/
.mcl-floating-icon .fa-brands,
.mcl-shortcode-wrapper .fab,
.mcl-shortcode-wrapper .fas {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

.mcl-shortcode-wrapper .fab,
.mcl-floating-icon .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}


/* Shortcode Wrapper Styles */
.mcl-shortcode-wrapper a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.mcl-info-container .mcl-shortcode-wrapper {
    display: block; /* Makes each link appear on a new line */
    margin-bottom: 10px;
}

.mcl-label {
    margin-right: 5px;
    font-weight: bold;
}
