/* ==========================================
   Galaxy2 — Comments for Posts (CSS)
   BEAUTIFUL VERSION — ONLY FOR POSTS
   ========================================== */

/* ==========================================
   A. Shared comment styles (modal + under posts)
   ========================================== */

/* Comment item (shared) */
.galaxy2-comment-item {
    background: #f9f9f9;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px solid #e0e0e0;
    font-size: 15px;
}

/* Header (author + date) */
.g2c-comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.g2c-comment-author {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

.g2c-comment-date {
    font-size: 12px;
    opacity: 0.6;
}

/* Comment text */
.g2c-comment-text {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 12px;
    word-wrap: break-word;
}

/* Footer buttons */
.g2c-comment-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.g2c-comment-footer button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.15s;
    color: #444;
}

.g2c-comment-footer button:hover {
    background: #e6e6e6;
}

/* Reaction bar */
.g2c-reaction-bar {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.g2c-reaction-item {
    background: #fff;
    border: 1px solid #ddd;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 14px;
}

/* Emoji popup (shared) */
.g2c-emoji-popup {
    position: absolute;
    background: #fff;
    border-radius: 10px;
    padding: 6px 8px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    z-index: 9999999;
    display: flex;
    gap: 6px;
}

.g2c-emoji-item {
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: 0.15s;
}

.g2c-emoji-item:hover {
    background: #f0f0f0;
}

/* ==========================================
   B. Modal-specific styles
   ========================================== */

/* Modal overlay */
#g2-post-comments-modal.g2c-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 999999;
    display: none;
    overflow-y: auto;
}

/* Modal window */
#g2-post-comments-modal .g2c-modal-inner {
    width: 480px;
    max-height: 85vh;
    background: #fff;
    margin: 60px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0,0,0,0.35);
    position: relative;
}

/* Close button */
#g2-post-comments-modal .g2c-modal-close {
    position: absolute;
    right: 14px;
    top: 12px;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
    color: #444;
}

/* Title */
#g2-post-comments-modal .g2c-modal-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* Comments list */
#g2-post-comments-modal .g2c-comments-list {
    margin-bottom: 20px;
}

/* Comment form */
#g2-post-comments-modal .g2c-comment-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#g2-post-comments-modal #g2c-new-comment {
    flex: 1;
    height: 60px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    resize: none;
    font-size: 15px;
}

#g2-post-comments-modal #g2c-send-comment {
    padding: 10px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.15s;
}

#g2-post-comments-modal #g2c-send-comment:hover {
    background: #005f8a;
}

/* ==========================================
   C. FIX: isolate modal from theme styles
   (оставляем, но уже не критично)
   ========================================== */

#g2-post-comments-modal .galaxy2-comment-item {
    background: #f9f9f9 !important;
    border: 1px solid #e0e0e0 !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
    margin-bottom: 14px !important;
    font-size: 15px !important;
}

#g2-post-comments-modal .g2c-comment-header {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
}

#g2-post-comments-modal .g2c-comment-text {
    font-size: 15px !important;
    line-height: 1.45 !important;
    margin-bottom: 12px !important;
    word-wrap: break-word !important;
}

#g2-post-comments-modal .g2c-comment-footer {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

#g2-post-comments-modal .g2c-comment-footer button {
    background: #eee !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    cursor: pointer !important;
    color: #444 !important;
}

#g2-post-comments-modal .g2c-comment-footer button:hover {
    background: #ddd !important;
}

#g2-post-comments-modal .g2c-reaction-bar {
    margin-top: 10px !important;
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

#g2-post-comments-modal .g2c-emoji-popup {
    z-index: 9999999 !important;
}


/* ==========================================
   FORCE APPLY STYLES (OVERRIDE THEME)
   ========================================== */

.galaxy2-comment-item,
.g2c-comment-header,
.g2c-comment-author,
.g2c-comment-date,
.g2c-comment-text,
.g2c-comment-footer button,
.g2c-reaction-bar,
.g2c-reaction-item {
    all: unset;
    display: revert;
}

/* Re-apply our clean design */
.galaxy2-comment-item {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    margin-bottom: 18px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
}

.g2c-comment-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}

.g2c-comment-author {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #222 !important;
}

.g2c-comment-date {
    font-size: 12px !important;
    opacity: 0.55 !important;
}

.g2c-comment-text {
    font-size: 15px !important;
    line-height: 1.55 !important;
    margin-bottom: 14px !important;
    color: #333 !important;
}

.g2c-comment-footer button {
    background: #f2f2f2 !important;
    border-radius: 8px !important;
    padding: 5px 10px !important;
    font-size: 14px !important;
    color: #444 !important;
}

.g2c-comment-footer button:hover {
    background: #e6e6e6 !important;
}

.g2c-reaction-bar {
    margin-top: 12px !important;
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.g2c-reaction-item {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
}

.g2-comments-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

