/* ==========================================================================
   Elm Asma - Modern Comments System (ELM-COMMENTS-001)
   No-Avatar Clean Layout + Threaded Timeline + «پاسخ رسمی استاد» + Copy Pills
   ========================================================================== */

#comments.comments-area {
    margin-top: 36px;
    margin-bottom: 40px;
    padding-top: 10px;
}

#comments.comments-area .comments-title {
    font-size: 18px;
    font-weight: 800;
    color: #1b2d63;
    margin-bottom: 26px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#comments.comments-area .comments-title span {
    color: #b6924a;
}

/* Hide avatars and image containers completely */
#comments.comments-area .comment-author,
#comments.comments-area .avatar,
#comments.comments-area .flex-row > .flex-col:has(.comment-author) {
    display: none !important;
}

/* List resets */
#comments.comments-area ol.comment-list,
#comments.comments-area ul.children {
    list-style: none;
    padding: 0;
    margin: 0;
}

#comments.comments-area ol.comment-list > li.comment {
    position: relative;
    margin-bottom: 24px;
}

/* Comment article row */
#comments.comments-area article.comment-inner {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
}

#comments.comments-area article.comment-inner .flex-row {
    display: block;
    width: 100%;
}

/* Bubble body */
#comments.comments-area .comment-inner .flex-grow {
    display: block;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    transition: all 0.2s ease;
    position: relative;
}

#comments.comments-area .comment-inner .flex-grow:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

/* Author header */
#comments.comments-area cite.fn {
    font-style: normal;
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#comments.comments-area span.says {
    display: none !important;
}

/* Comment text */
#comments.comments-area .comment-content {
    margin: 12px 0 16px;
    font-size: 14.5px;
    line-height: 1.85;
    color: #334155;
    text-align: justify;
}

#comments.comments-area .comment-content p {
    margin: 0 0 10px 0;
}

#comments.comments-area .comment-content p:last-child {
    margin-bottom: 0;
}

/* Comment metadata (date + reply button) */
#comments.comments-area .comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
}

#comments.comments-area .comment-meta a {
    color: #64748b;
    text-decoration: none;
}

#comments.comments-area .comment-meta time {
    color: #64748b;
    font-weight: 500;
}

#comments.comments-area .comment-meta a.comment-reply-link {
    background: #f8fafc;
    color: #253e88;
    border: 1px solid #e2e8f0;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

#comments.comments-area .comment-meta a.comment-reply-link:hover {
    background: #253e88;
    color: #ffffff;
    border-color: #253e88;
}

#comments.comments-area .comment-meta a.comment-reply-link::before {
    content: '↩';
    font-size: 13px;
}

/* ==========================================================================
   ADMIN / POST AUTHOR: «پاسخ رسمی استاد»
   ========================================================================== */

#comments.comments-area li.bypostauthor > article.comment-inner .flex-grow,
#comments.comments-area li.comment-author-admin > article.comment-inner .flex-grow {
    background: #fbf8f1;
    border: 1.5px solid rgba(182, 146, 74, 0.4);
    border-inline-start: 5px solid #b6924a;
    box-shadow: 0 4px 18px rgba(182, 146, 74, 0.08);
}

#comments.comments-area li.bypostauthor cite.fn,
#comments.comments-area li.comment-author-admin cite.fn {
    color: #1b2d63;
    font-weight: 800;
}

/* «پاسخ رسمی استاد» Badge */
#comments.comments-area li.bypostauthor cite.fn::after,
#comments.comments-area li.comment-author-admin cite.fn::after {
    content: '★ پاسخ رسمی استاد';
    background: linear-gradient(135deg, #b6924a, #8c6a26);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(140, 106, 38, 0.25);
    letter-spacing: 0.2px;
    margin-inline-start: 8px;
    display: inline-flex;
    align-items: center;
}

#comments.comments-area li.bypostauthor .comment-content,
#comments.comments-area li.comment-author-admin .comment-content {
    color: #292524;
}

/* Nested replies thread indentation */
#comments.comments-area ul.children {
    margin-top: 18px;
    margin-inline-start: 36px;
    padding-inline-start: 20px;
    border-inline-start: 2px dashed #cbd5e1;
}

/* ==========================================================================
   COPY HANDLE PILL / BADGE STYLING (@elmolasma110)
   ========================================================================== */

.elm-copy-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid rgba(182, 146, 74, 0.45);
    color: #8c6a26;
    padding: 4px 10px 4px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    direction: ltr;
    margin: 6px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(182, 146, 74, 0.08);
    position: relative;
    vertical-align: middle;
    user-select: all;
}

.elm-copy-pill:hover {
    background: #fdfcf9;
    border-color: #b6924a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 146, 74, 0.16);
}

.elm-copy-pill:active {
    transform: translateY(0);
}

.elm-copy-pill .copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b6924a;
    padding: 4px;
    border-radius: 50%;
    background: rgba(182, 146, 74, 0.1);
    transition: background 0.2s;
}

.elm-copy-pill:hover .copy-icon {
    background: #b6924a;
    color: #ffffff;
}

.elm-copy-pill .copy-label {
    font-size: 11px;
    background: rgba(182, 146, 74, 0.12);
    color: #8c6a26;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 600;
    direction: rtl;
}

/* Tooltip notification */
.elm-copy-pill .copy-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1e293b;
    color: #ffffff;
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.elm-copy-pill .copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.elm-copy-pill.is-copied .copy-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.elm-copy-pill.is-copied {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.elm-copy-pill.is-copied .copy-icon {
    background: #22c55e;
    color: #ffffff;
}

/* ==========================================================================
   COMMENT FORM POLISH (#respond)
   ========================================================================== */

#respond.comment-respond {
    margin-top: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 24px;
}

#respond.comment-respond .comment-reply-title {
    font-size: 17px;
    font-weight: 800;
    color: #1b2d63;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid #e2e8f0;
}

#respond.comment-respond textarea,
#respond.comment-respond input[type="text"],
#respond.comment-respond input[type="email"] {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

#respond.comment-respond textarea:focus,
#respond.comment-respond input[type="text"]:focus,
#respond.comment-respond input[type="email"]:focus {
    border-color: #253e88;
    box-shadow: 0 0 0 3px rgba(37, 62, 136, 0.12);
    outline: none;
}

#respond.comment-respond input#submit {
    background: #253e88;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 62, 136, 0.2);
    transition: all 0.2s ease;
}

#respond.comment-respond input#submit:hover {
    background: #1b2d63;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 62, 136, 0.3);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #comments.comments-area .comment-inner .flex-grow {
        padding: 16px;
    }

    #comments.comments-area ul.children {
        margin-inline-start: 12px;
        padding-inline-start: 12px;
    }

    #respond.comment-respond {
        padding: 20px 16px;
    }
}
