/**
 * Mindflix Article Feelings - Public CSS
 * Styles for the feelings voting circles
 */

.mindflix-feelings-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    direction: rtl;
}

.mindflix-feelings-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.mindflix-feelings-circles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.mindflix-feeling-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mindflix-feeling-item:hover {
    transform: scale(1.05);
}

.mindflix-circle {
    border: 3px solid #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #e8e8e8;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    user-select: none;
    overflow: visible;
    box-sizing: border-box;
}

/* Ensure hover state works */
.mindflix-feelings-container .mindflix-feeling-item:hover .mindflix-circle {
    animation: mindflix-pulse 1.8s infinite ease-in-out !important;
    position: relative !important;
    z-index: 10 !important;
    overflow: visible !important;
}

.mindflix-circle-text {
    font-size: 18px;
    font-weight: bold;
    color: #34495e;
    user-select: none;
}

.mindflix-count-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Like circle specific styles */
.mindflix-like .mindflix-circle {
    background: #e8e8e8;
    border-color: #34495e;
}

.mindflix-like .mindflix-circle-text {
    color: #34495e;
}

.mindflix-like .mindflix-count-badge {
    background: #34495e;
}

/* Dislike circle specific styles */
.mindflix-dislike .mindflix-circle {
    background: #e8e8e8;
    border-color: #34495e;
}

.mindflix-dislike .mindflix-circle-text {
    color: #34495e;
}

.mindflix-dislike .mindflix-count-badge {
    background: #34495e;
}

/* Pulse animation for hover - Beautiful halo effect */
@keyframes mindflix-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(52, 152, 219, 0.2);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 25px rgba(52, 152, 219, 0);
        transform: scale(1);
    }
}

.mindflix-feeling-item:hover .mindflix-circle {
    animation: mindflix-pulse 1.8s infinite ease-in-out !important;
    position: relative !important;
    z-index: 10 !important;
    overflow: visible !important;
}

/* Click animation */
@keyframes clickPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.mindflix-circle.clicked {
    animation: clickPulse 0.6s ease-out;
}

/* Loading state */
.mindflix-feeling-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mindflix-feeling-item.loading .mindflix-circle {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Voted state */
.mindflix-feeling-item.voted {
    opacity: 0.7;
    pointer-events: none;
}

.mindflix-feeling-item.voted .mindflix-circle {
    border-style: dashed;
}

/* Success message */
.mindflix-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: bold;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Social Share Buttons Styles */
.mindflix-share-container {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    direction: rtl;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Thin mode for inline display */
.mindflix-share-container.mindflix-share-thin {
    display: inline-block;
    margin: 15px 0 0 0;
    padding: 0;
    background: none;
    border-radius: 0;
    text-align: left;
    vertical-align: middle;
}

.mindflix-share-buttons {
    display: flex !important;
    justify-content: center;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.mindflix-share-buttons-row {
    display: flex !important;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: row !important;
}

/* Remove ALL unwanted paragraphs and breaks in share buttons */
.mindflix-share-buttons-row > p,
.mindflix-share-container > p,
.mindflix-share-buttons > p,
.mindflix-share-buttons-row p,
.mindflix-share-container p,
.mindflix-share-buttons p {
    padding: 0 !important;
    margin: 0 !important;
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    border: none !important;
    background: none !important;
}

.mindflix-share-buttons-row br,
.mindflix-share-container br,
.mindflix-share-buttons br {
    display: none !important;
}

/* Ensure feelings circles are not affected by global p styles */
.mindflix-feelings-container p,
.mindflix-feeling-item p,
.mindflix-circle p {
    padding: 0 !important;
    margin: 0 !important;
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    border: none !important;
    background: none !important;
}

/* Ensure SVG icons are not clipped */
.mindflix-share-link,
.mindflix-copy-link-button {
    overflow: visible;
}

.mindflix-share-link svg,
.mindflix-copy-link-button svg {
    overflow: visible;
}

/* Thin mode adjustments */
.mindflix-share-thin .mindflix-share-buttons {
    display: inline-flex;
}

.mindflix-share-thin .mindflix-share-buttons-row {
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.mindflix-share-link,
.mindflix-copy-link-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    min-width: 45px;
    min-height: 45px;
    border-radius: 50%;
    background: #fff !important;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Thin mode button adjustments */
.mindflix-share-thin .mindflix-share-link,
.mindflix-share-thin .mindflix-copy-link-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-width: 1px;
}

.mindflix-share-link:hover,
.mindflix-copy-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #34495e;
}

.mindflix-share-link i,
.mindflix-copy-link-button i {
    font-size: 20px !important;
    transition: all 0.3s ease;
    color: #6c757d !important;
    display: inline-block !important;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

/* Fallback for when Font Awesome doesn't load */
.mindflix-share-twitter i:not(.fa-twitter)::after {
    content: "𝕏";
    font-family: Arial, sans-serif;
}

.mindflix-share-whatsapp i:not(.fa-whatsapp)::after {
    content: "📱";
    font-family: Arial, sans-serif;
}

.mindflix-share-facebook i:not(.fa-facebook-f)::after {
    content: "f";
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.mindflix-copy-link-button i:not(.fa-link)::after {
    content: "🔗";
    font-family: Arial, sans-serif;
}

/* Thin mode icon adjustments */
.mindflix-share-thin .mindflix-share-link i,
.mindflix-share-thin .mindflix-copy-link-button i {
    font-size: 16px;
}

.mindflix-share-link:hover i,
.mindflix-copy-link-button:hover i {
    transform: scale(1.1);
}

/* Specific social media colors on hover */
.mindflix-share-twitter:hover {
    background: #1da1f2 !important;
    border-color: #1da1f2 !important;
}

.mindflix-share-twitter:hover i {
    color: white !important;
}

.mindflix-share-whatsapp:hover {
    background: #25d366 !important;
    border-color: #25d366 !important;
}

.mindflix-share-whatsapp:hover i {
    color: white !important;
}

.mindflix-share-facebook:hover {
    background: #1877f2 !important;
    border-color: #1877f2 !important;
}

.mindflix-share-facebook:hover i {
    color: white !important;
}

.mindflix-copy-link-button:hover {
    background: #6c757d !important;
    border-color: #6c757d !important;
}

.mindflix-copy-link-button:hover i {
    color: white !important;
}

/* Tooltip for copy link */
.mindflix-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.mindflix-tooltip-arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #2c3e50;
}

.mindflix-copy-link-button.copied .mindflix-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Click animation */
.mindflix-share-link:active,
.mindflix-copy-link-button:active {
    transform: translateY(0) scale(0.95);
}

/* Back to Top Button Styles */
.mindflix-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #34495e 0%, #34495e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    color: white;
}

.mindflix-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.mindflix-back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, #2c3e50 0%, #2c3e50 100%);
}

.mindflix-back-to-top:active {
    transform: translateY(-1px) scale(0.95);
}

.mindflix-back-to-top svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.mindflix-back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Pulse animation when first appears */
.mindflix-back-to-top.show {
    animation: backToTopAppear 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes backToTopAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        transform: translateY(-5px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* FORCE animation to work - Override ANY theme CSS */
body .mindflix-feelings-container .mindflix-feeling-item:hover .mindflix-circle,
html body .mindflix-feelings-container .mindflix-feeling-item:hover .mindflix-circle,
.mindflix-feelings-container .mindflix-feeling-item.hover .mindflix-circle {
    animation: mindflix-pulse 1.8s infinite ease-in-out !important;
    animation-play-state: running !important;
    animation-fill-mode: none !important;
    position: relative !important;
    z-index: 999 !important;
    overflow: visible !important;
    transform-origin: center center !important;
    will-change: transform, box-shadow !important;
}

/* Ensure container doesn't clip the animation */
body .mindflix-feelings-container,
body .mindflix-feelings-circles,
body .mindflix-feeling-item {
    overflow: visible !important;
    position: relative !important;
    contain: none !important;
}

/* Override any theme animation disabling */
body .mindflix-feeling-item,
body .mindflix-circle {
    animation-duration: inherit !important;
    animation-timing-function: inherit !important;
    animation-delay: inherit !important;
    animation-iteration-count: inherit !important;
    animation-direction: inherit !important;
    animation-fill-mode: inherit !important;
    animation-play-state: inherit !important;
}

/* Debug: Add a simple hover effect to test */
.mindflix-feeling-item:hover {
    transform: scale(1.02) !important;
    transition: transform 0.3s ease !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .mindflix-feelings-circles {
        gap: 20px;
    }

    .mindflix-feelings-title {
        font-size: 20px;
    }

    .mindflix-circle-text {
        font-size: 16px;
    }

    .mindflix-share-buttons-row {
        gap: 12px;
    }

    .mindflix-share-link,
    .mindflix-copy-link-button {
        width: 40px;
        height: 40px;
    }

    .mindflix-share-link svg,
    .mindflix-copy-link-button svg {
        width: 20px;
        height: 20px;
    }
}