/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 *
 * @package    Emojis_For_Posts_And_Pages
 * @subpackage Emojis_For_Posts_And_Pages/public/css
 * @since      1.0.0
 */

.emojfopo-container {
    display: block;
    clear: both;
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.emojfopo-container.floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    padding: 10px 15px;
    margin: 0;
    max-width: 300px;
}

.emojfopo-title {
    margin-right: 15px;
    font-weight: bold;
    margin-bottom: 10px;
}

.emojfopo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emojfopo-reaction-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    padding: 8px;
    border-radius: 50px;
    background: #f5f5f5;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.emojfopo-reaction-button:hover {
    background: #e9e9e9;
    transform: scale(1.05);
}

.emojfopo-reaction-button.active {
    border-color: #4e9ef8;
    background: #f0f7ff;
}

.emojfopo-reaction-button .emoji {
    font-size: 24px;
    line-height: 1;
    font-family: 'Noto Color Emoji', sans-serif;
}

.emojfopo-reaction-button .count {
    font-size: 12px;
    margin-top: 3px;
    color: #666;
}

/* Reaction name styling removed */

.emojfopo-message {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    width: 100%;
    text-align: center;
}

/* Special styling for archive/blog list pages */
.archive .emojfopo-container,
.blog .emojfopo-container,
.home .emojfopo-container {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    display: block;
    width: 100%;
    clear: both;
    border-top: 1px solid #eee;
}

/* Animation for reaction */
@keyframes reaction-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.emojfopo-reaction-button.reacting .emoji {
    animation: reaction-pulse 0.3s ease-in-out;
}

/* Count pop when a reaction grows */
@keyframes emojfopo-count-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.6); color: #4e9ef8; }
    100% { transform: scale(1); }
}

.emojfopo-reaction-button .count.emojfopo-count-pop {
    display: inline-block;
    animation: emojfopo-count-pop 0.45s ease-out;
}

/* ------------------------------------------------------------------ *
 * Share row
 * ------------------------------------------------------------------ */
.emojfopo-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e2e2e2;
}

.emojfopo-share-label {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    margin-right: 2px;
}

.emojfopo-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    color: #fff;
    background: #555;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.emojfopo-share-btn:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    color: #fff;
}

.emojfopo-share-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.emojfopo-share-btn .emojfopo-check {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.emojfopo-share-x    { background: #000; }
.emojfopo-share-fb   { background: #1877f2; font-weight: 700; font-family: Georgia, "Times New Roman", serif; }
.emojfopo-share-wa   { background: #25d366; }
.emojfopo-share-copy { background: #14b8a6; }
.emojfopo-share-copy.copied { background: #16a34a; }

/* ------------------------------------------------------------------ *
 * Effects overlay layer (burst, floating emoji, confetti, toast)
 * ------------------------------------------------------------------ */
#emojfopo-fx-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2147483600;
}

.emojfopo-particle {
    position: fixed;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
    animation: emojfopo-burst 0.9s ease-out forwards;
}

@keyframes emojfopo-burst {
    0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1); opacity: 0; }
}

.emojfopo-float {
    position: fixed;
    font-size: 26px;
    transform: translate(-50%, 0);
    will-change: transform, opacity;
    animation: emojfopo-rise 1.6s ease-out forwards;
}

@keyframes emojfopo-rise {
    0%   { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
    15%  { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--drift)), -160px) scale(1.3); opacity: 0; }
}

.emojfopo-confetti {
    position: fixed;
    top: -12px;
    width: 9px;
    height: 14px;
    border-radius: 2px;
    will-change: transform, opacity;
    animation: emojfopo-fall var(--fall, 2s) linear var(--delay, 0s) forwards;
}

@keyframes emojfopo-fall {
    0%   { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(var(--spin, 360deg)); opacity: 0.9; }
}

.emojfopo-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 24px);
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.35s ease;
    max-width: 90vw;
    text-align: center;
}

.emojfopo-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .emojfopo-particle,
    .emojfopo-float,
    .emojfopo-confetti {
        display: none !important;
    }
    .emojfopo-reaction-button .count.emojfopo-count-pop {
        animation: none;
    }
}

/* Mobile responsive styles */
@media (max-width: 767px) {
    .emojfopo-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .emojfopo-title {
        margin-bottom: 10px;
    }
    
    .emojfopo-container.floating {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        border-radius: 0;
    }
}
