/* =========================================================
   Комментарии по работе портала
   ========================================================= */

.portal-comments-nav-btn {
    border-color: #7c3aed !important;
    color: #5b21b6 !important;
    background: #ffffff !important;
}

.portal-comments-nav-btn:hover {
    background: #f5f3ff !important;
    border-color: #7c3aed !important;
    color: #5b21b6 !important;
}

.portal-comments-alert {
    background: #7c3aed !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
    animation: portalCommentPulse 1.3s infinite;
}

@keyframes portalCommentPulse {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, .38); }
    70% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.portal-comment-box {
    width: 620px !important;
}

.portal-comment-hint {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #4c1d95;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
    line-height: 1.45;
}

#portalCommentText {
    min-height: 130px !important;
}

.admin-comments-box {
    width: 1100px !important;
}

.admin-comments-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.admin-comments-actions button {
    width: auto !important;
}

.portal-comment-unread-row td {
    background: #faf5ff !important;
}

.portal-comment-new {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    background: #7c3aed;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.portal-comment-priority {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 900;
}

.portal-comment-priority.important {
    background: #fff7ed;
    color: #9a3412;
}

.portal-comment-priority.urgent {
    background: #fef2f2;
    color: #991b1b;
}

.portal-comments-admin-popup {
    position: fixed;
    right: 18px;
    top: 18px;
    width: 340px;
    max-width: calc(100vw - 36px);
    z-index: 99999;
    background: #ffffff;
    border: 2px solid #7c3aed;
    border-left: 6px solid #7c3aed;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(76, 29, 149, 0.24);
    padding: 12px;
    display: none;
}

.portal-comments-popup-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: #4c1d95;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd6fe;
    margin-bottom: 10px;
}

.portal-comments-popup-head button {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #4c1d95 !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 8px !important;
}

.portal-comments-popup-body {
    display: grid;
    gap: 7px;
    font-size: 13px;
    color: #111827;
}

.portal-comments-popup-text {
    margin-top: 4px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #4c1d95;
    border-radius: 10px;
    padding: 8px;
    line-height: 1.35;
}

.portal-comments-popup-body button {
    margin-top: 6px;
    width: 100% !important;
    min-height: 38px !important;
    background: #7c3aed !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
}

@media (max-width: 950px) {
    .portal-comment-box,
    .admin-comments-box {
        width: 100% !important;
    }

    .admin-comments-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-comments-actions button {
        width: 100% !important;
    }

    .portal-comments-admin-popup {
        top: 10px;
        right: 10px;
        width: 320px;
        max-width: calc(100vw - 20px);
    }
}
