#commentsModuleContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

#commentsModuleContainer.comments-module--open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.comments-module-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#commentsModuleContainer.comments-module--open .comments-module-overlay {
    opacity: 1;
}

.comments-module-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: var(--color-cintillo-fondo, #1a1a1a);
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}

#commentsModuleContainer.comments-module--open .comments-module-panel {
    transform: translateY(0);
}

#commentsModuleContainer.comments-module--closing .comments-module-panel {
    transform: translateY(100%);
}

#commentsModuleContainer.comments-module--closing .comments-module-overlay {
    opacity: 0;
}

.comments-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.comments-module-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.comments-module-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-cards-titulo-primario)!important;
    font-size: 1.1rem;
    font-weight: 600;
}

.comments-module-title span {
    color: var(--color-cards-titulo-primario)!important;
}

.comments-module-title i {
    font-size: 1.3rem;
    color: var(--color-cards-texto-resaltado-primario);
}

.comments-module-count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.comments-module-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.comments-module-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.comments-module-close i {
    color: var(--color-cards-texto-primario);
    font-size: 1.1rem;
}

.comments-module-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}
.comments-module-list p{
    color: var(--color-cards-texto-primario)!important;
}
.comments-module-list span{
    color: var(--color-cards-texto-primario)!important;
}
.comments-module-list::-webkit-scrollbar {
    width: 4px;
}

.comments-module-list::-webkit-scrollbar-track {
    background: transparent;
}

.comments-module-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.comments-module-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    animation: commentSlideIn 0.3s ease;
}

@keyframes commentSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comments-module-item--removing {
    animation: commentSlideOut 0.3s ease forwards;
}

@keyframes commentSlideOut {
    to {
        opacity: 0;
        transform: translateX(-20px);
        height: 0;
        padding: 0;
        margin: 0;
    }
}

.comments-module-avatar {
    flex-shrink: 0;
}

.comments-module-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.comments-module-content {
    flex: 1;
    min-width: 0;
}

.comments-module-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comments-module-username {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.comments-module-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.comments-module-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

.comments-module-delete {
    position: absolute;
    top: 12px;
    right: 0;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.comments-module-item:hover .comments-module-delete {
    opacity: 1;
}

.comments-module-delete i {
    color: #ff4757;
    font-size: 0.9rem;
}

.comments-module-delete:hover i {
    color: #ff6b7a;
}

.comments-module-form {
    padding: 12px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    background: var(--color-cintillo-fondo, #1a1a1a);
}

.comments-module-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 6px 6px 6px 18px;
}

.comments-module-input {
    flex: 1;
    background: var(--color-input-cards-fondo);
    border: 1px solid var(--color-input-cards-borde);
    outline: none;
    color: var(--color-input-cards-texto);
    font-size: 0.95rem;
    padding: 8px 8px;
    border-radius: .7em;
}

.comments-module-input::placeholder {
    color: var(--color-input-cards-placeholder);
}

.comments-module-submit {
    background: var(--color-cards-texto-resaltado-primario);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.comments-module-submit:hover:not(:disabled) {
    transform: scale(1.05);
    background: #ff4136;
}

.comments-module-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comments-module-submit i {
    color: #fff;
    font-size: 1rem;
}

.comments-module-empty,
.comments-module-loading,
.comments-module-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--color-cards-texto-resaltado-primario)!important;
    padding: 40px 20px;
}

.comments-module-empty i,
.comments-module-loading i,
.comments-module-error i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.comments-module-empty p,
.comments-module-loading p,
.comments-module-error p {
    font-size: 1rem;
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.8);
}

.comments-module-empty span {
    font-size: 0.85rem;
}

.comments-module-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--majestic-red, #ee3424);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.comments-module-error i {
    color: #ff4757;
}

.comments-module-retry {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.comments-module-retry:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
    .comments-module-panel {
        width: 450px;
        left: auto;
        right: 0;
        height: 80%;
        border-radius: 24px 0 0 0;
    }
}

@media (max-width: 480px) {
    .comments-module-panel {
        height: 85%;
    }

    .comments-module-header {
        padding: 14px 16px;
    }

    .comments-module-list {
        padding: 12px 16px;
    }

    .comments-module-form {
        padding: 10px 16px 16px;
    }

    .comments-module-avatar img {
        width: 38px;
        height: 38px;
    }
}
