/**
 * Post Reward System Styles
 * Estilos para el sistema de recompensas post-publicación
 * Parte del sistema de gamificación de GWOAW
 */

/* ===== RESALTADO DE PUBLICACIÓN ===== */
.publication-reward-highlight {
    position: relative;
    animation: publicationRewardPulse 2s ease-in-out;
    transition: all 0.3s ease;
    /* IMPORTANTE: Asegurar que los elementos internos mantengan su posicionamiento correcto */
    /* NO usar isolation: isolate porque puede afectar los dropdowns con position: absolute */
}

.publication-reward-highlight::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 12px;
    border: 3px solid rgba(83, 252, 27, 0.6);
    z-index: -1;
    pointer-events: none;
    box-shadow: 0 0 30px rgba(83, 252, 27, 0.4),
                0 0 60px rgba(83, 252, 27, 0.2);
    animation: publicationRewardGlow 2s ease-in-out;
}

/* IMPORTANTE: Asegurar que el resaltado NO afecte el comportamiento normal de los elementos internos */
/* El resaltado solo debe afectar visualmente (borde y animación), no funcionalmente */

/* Asegurar que el dropdown mantenga su comportamiento normal - NO forzar display */
.publication-reward-highlight .feed-item__actions-dropdown {
    /* Mantener comportamiento original - NO forzar display */
    z-index: 10003 !important;
    position: absolute !important;
    /* Asegurar que si tiene display: none, se mantenga */
}

.publication-reward-highlight .feed-item__actions-dropdown:not(.show) {
    display: none !important;
}

.publication-reward-highlight .feed-item__actions-dropdown.show {
    display: block !important;
    z-index: 10004 !important;
    position: absolute !important;
}

.publication-reward-highlight .feed-item__actions-menu {
    z-index: 10002 !important;
    position: relative !important;
}

/* Asegurar que el contenido interno mantenga su contexto de posicionamiento */
.publication-reward-highlight .feed-item__actions {
    position: relative !important;
    z-index: 2 !important;
}

.publication-reward-highlight .feed-item__header {
    position: relative !important;
    z-index: 2 !important;
}

/* Asegurar que el ::before del resaltado no interfiera con los elementos internos */
.publication-reward-highlight::before {
    /* El z-index: -1 ya está definido arriba, esto es solo para claridad */
    z-index: -1 !important;
    /* Asegurar que no afecte pointer events */
    pointer-events: none !important;
}

@keyframes publicationRewardPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes publicationRewardGlow {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 30px rgba(83, 252, 27, 0.4),
                    0 0 60px rgba(83, 252, 27, 0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 50px rgba(83, 252, 27, 0.6),
                    0 0 100px rgba(83, 252, 27, 0.4);
    }
}

/* ===== MENSAJE DE RECOMPENSA ===== */
.reward-message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100005;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.reward-message-container.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.reward-message-content {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(83, 252, 27, 0.3),
                0 0 60px rgba(83, 252, 27, 0.2),
                inset 0 0 80px rgba(83, 252, 27, 0.05);
    border: 1px solid rgba(83, 252, 27, 0.2);
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.reward-message-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #53fc1b 0%, #10b981 50%, #34d399 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(83, 252, 27, 0.6),
                0 0 60px rgba(83, 252, 27, 0.3);
    animation: rewardIconPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.reward-message-icon i {
    font-size: 1.75rem;
    color: #000;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

@keyframes rewardIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(83, 252, 27, 0.6),
                    0 0 60px rgba(83, 252, 27, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 50px rgba(83, 252, 27, 0.8),
                    0 0 100px rgba(83, 252, 27, 0.5);
    }
}

.reward-message-text {
    flex: 1;
}

.reward-message-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #53fc1b 0%, #10b981 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #53fc1b; /* Fallback */
}

.reward-message-description {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1rem 0;
}

.reward-message-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(83, 252, 27, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(83, 252, 27, 0.2);
    margin-top: 0.75rem;
}

.reward-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(83, 252, 27, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reward-badge-icon i {
    font-size: 1.25rem;
}

.reward-badge-info {
    flex: 1;
}

.reward-badge-name {
    font-size: 1rem;
    font-weight: 600;
    color: #53fc1b;
    margin-bottom: 0.25rem;
}

.reward-badge-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.reward-message-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.reward-message-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(83, 252, 27, 0.5);
    color: #53fc1b;
    transform: rotate(90deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .reward-message-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .reward-message-content {
        padding: 1.25rem;
    }

    .reward-message-icon {
        width: 48px;
        height: 48px;
    }

    .reward-message-icon i {
        font-size: 1.5rem;
    }

    .reward-message-title {
        font-size: 1.25rem;
    }

    .reward-message-description {
        font-size: 0.9375rem;
    }
}

/* ===== MODO OSCURO/CLARO ===== */
[data-theme="dark"] .reward-message-content,
.dark-mode .reward-message-content,
html.dark-mode .reward-message-content,
body.dark-mode .reward-message-content {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
}

[data-theme="light"] .reward-message-content,
.light-mode .reward-message-content,
html.light-mode .reward-message-content,
body.light-mode .reward-message-content {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 50%, #ffffff 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(83, 252, 27, 0.3),
                0 0 60px rgba(83, 252, 27, 0.15);
}

[data-theme="light"] .reward-message-description,
.light-mode .reward-message-description {
    color: #1a1a1a;
}

[data-theme="light"] .reward-badge-description,
.light-mode .reward-badge-description {
    color: #666;
}
