/**
 * Estilos para Sistema de Interacciones Sociales
 * Likes, Shares, Comentarios
 * 
 * @package Grupo_Mexico
 */

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */

.social-interactions {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========================================
   BARRA DE ACCIONES
   ======================================== */

.social-interactions__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.social-interactions__action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-interactions__action-btn:hover {
    background: #E5E7EB;
    color: #374151;
}

.social-interactions__action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.social-interactions__action-btn.active {
    background: #9B1C1C;
    color: #FFFFFF;
    border-color: #9B1C1C;
}

.social-interactions__action-btn .social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-interactions__action-text {
    white-space: nowrap;
}

.social-interactions__count {
    font-weight: 600;
}

/* Botón de Like - Estados especiales */
.social-interactions__like-btn.liked {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FCA5A5;
}

.social-interactions__like-btn.liked .social-icon {
    fill: #DC2626;
}

.social-interactions__like-btn.pulse {
    animation: pulse 0.3s ease;
}

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

/* ========================================
   SECCIÓN DE COMENTARIOS
   ======================================== */

.social-interactions__comments-section {
    margin-top: 20px;
}

.social-interactions__login-prompt {
    text-align: center;
    padding: 40px 20px;
    background: #F9FAFB;
    border-radius: 8px;
}

.social-interactions__login-prompt p {
    margin: 0 0 16px 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6B7280;
}

/* ========================================
   FORMULARIO DE COMENTARIO
   ======================================== */

.social-comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.social-comment-form__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.social-comment-form__avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.social-comment-form__input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-comment-form__textarea {
    width: 100%;
    min-height: 40px;
    max-height: 200px;
    padding: 10px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #111827;
    resize: none;
    overflow-y: auto;
    transition: border-color 0.2s ease;
}

.social-comment-form__textarea:focus {
    outline: none;
    border-color: #9B1C1C;
}

.social-comment-form__textarea::placeholder {
    color: #9CA3AF;
}

.social-comment-form__actions {
    display: flex;
    justify-content: flex-end;
}

.social-comment-form__submit-btn {
    padding: 8px 20px;
    background: #9B1C1C;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-comment-form__submit-btn:hover:not(:disabled) {
    background: #7F1D1D;
}

.social-comment-form__submit-btn:disabled {
    background: #D1D5DB;
    color: #9CA3AF;
    cursor: not-allowed;
}

/* ========================================
   LISTA DE COMENTARIOS
   ======================================== */

.social-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-comments-list__loading,
.social-comments-list__error,
.social-comments-list__empty {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.social-comments-list__loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-top-color: #9B1C1C;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.social-comments-list__load-more-wrapper {
    text-align: center;
    margin-top: 16px;
}

.social-comments-list__load-more {
    padding: 10px 24px;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-comments-list__load-more:hover {
    background: #F3F4F6;
    color: #374151;
}

/* ========================================
   COMENTARIO INDIVIDUAL
   ======================================== */

.social-comment {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.social-comment:hover {
    background: #F3F4F6;
}

.social-comment__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.social-comment__avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.social-comment__content {
    flex: 1;
    min-width: 0;
}

.social-comment__header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.social-comment__author {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.social-comment__time {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #9CA3AF;
}

.social-comment__text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.social-comment__actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.social-comment__action-btn {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.social-comment__action-btn:hover {
    color: #9B1C1C;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */

.social-interactions__toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: #111827;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.social-interactions__toast.error {
    background: #DC2626;
}

.social-interactions__toast.success {
    background: #059669;
}

.social-interactions__toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-interactions__toast-content svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-interactions__toast-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .social-interactions {
        padding: 16px;
        margin-top: 24px;
    }
    
    .social-interactions__actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .social-interactions__action-btn {
        flex: 1;
        min-width: calc(33.333% - 6px);
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .social-interactions__action-text {
        display: none;
    }
    
    .social-interactions__count {
        display: inline;
    }
    
    .social-comment-form {
        gap: 10px;
    }
    
    .social-comment-form__avatar,
    .social-comment__avatar {
        width: 36px;
        height: 36px;
    }
    
    .social-comment {
        padding: 12px;
    }
    
    .social-interactions__toast {
        bottom: 16px;
        left: 16px;
        right: 16px;
        transform: none;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
