/**
 * ION Video Reactions Styles
 * Styling for like/dislike buttons and feedback
 */

/* Reactions Container */
.video-reactions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

/* Reaction Button Base Styles */
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.reaction-btn:active {
    transform: translateY(0);
}

/* Like Button */
.reaction-btn.like-btn {
    color: #94a3b8 !important;
}

.reaction-btn.like-btn:hover {
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.reaction-btn.like-btn:hover svg {
    stroke: #10b981 !important;
}

.reaction-btn.like-btn:hover .like-count {
    color: #10b981 !important;
}

.reaction-btn.like-btn.active {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

.reaction-btn.like-btn.active svg {
    stroke: #10b981 !important;
    fill: none !important;
}

.reaction-btn.like-btn.active .like-count {
    color: #10b981 !important;
}

/* Dislike Button */
.reaction-btn.dislike-btn {
    color: #94a3b8 !important;
}

.reaction-btn.dislike-btn:hover {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.reaction-btn.dislike-btn:hover svg {
    stroke: #ef4444 !important;
}

.reaction-btn.dislike-btn:hover .dislike-count {
    color: #ef4444 !important;
}

.reaction-btn.dislike-btn.active {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

.reaction-btn.dislike-btn.active svg {
    stroke: #ef4444 !important;
    fill: none !important;
}

.reaction-btn.dislike-btn.active .dislike-count {
    color: #ef4444 !important;
}

/* Reaction Icons */
.reaction-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    transition: fill 0.2s ease;
    fill: none; /* Default no fill */
}

/* Reaction Counts */
.like-count,
.dislike-count {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    color: inherit; /* Inherit color from parent button */
    transition: color 0.2s ease;
}

/* Feedback Messages */
.reaction-feedback {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
}

.reaction-feedback::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(0, 0, 0, 0.9);
}

.reaction-feedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.reaction-feedback.error {
    background: #ef4444;
}

.reaction-feedback.error::after {
    border-top-color: #ef4444;
}

/* Compact/Small Size Variant */
.video-reactions.compact .reaction-btn {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
}

.video-reactions.compact .reaction-btn svg {
    width: 16px;
    height: 16px;
}

.video-reactions.compact .like-count,
.video-reactions.compact .dislike-count {
    font-size: 12px;
}

/* Icon-only Variant */
.video-reactions.icon-only .reaction-btn {
    padding: 8px;
    min-width: 36px;
    justify-content: center;
}

.video-reactions.icon-only .like-count,
.video-reactions.icon-only .dislike-count {
    display: none;
}

/* Disabled State */
.reaction-btn:disabled,
.reaction-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading State */
.reaction-btn.loading {
    position: relative;
    pointer-events: none;
}

.reaction-btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .video-reactions {
        gap: 8px;
    }
    
    .reaction-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .reaction-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .like-count,
    .dislike-count {
        font-size: 13px;
    }
}

/* Dark Theme Adjustments (default) */
.video-reactions {
    --reaction-bg: rgba(255, 255, 255, 0.05);
    --reaction-border: rgba(255, 255, 255, 0.1);
    --reaction-text: #94a3b8;
}

/* Light Theme (if needed) */
body.light-theme .video-reactions,
.video-reactions.light {
    --reaction-bg: rgba(0, 0, 0, 0.05);
    --reaction-border: rgba(0, 0, 0, 0.1);
    --reaction-text: #64748b;
}

body.light-theme .reaction-btn,
.video-reactions.light .reaction-btn {
    background: var(--reaction-bg);
    border-color: var(--reaction-border);
    color: var(--reaction-text);
}

/* Separator between reactions and other content */
.reactions-separator {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

/* Inline reactions (for embedding in other layouts) */
.video-reactions.inline {
    display: inline-flex;
    vertical-align: middle;
}

