/* afisha-v2/comments.css — V2 event-page comments (Tickets backend, dark-theme native).
   Created 2026-06-06. Namespace: .ep-comments* / .ep-comment* / .ep-field. */

.ep-comments-thread {
    margin-top: 16px;
}

.ep-comments__list,
.ep-comment__children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-comments__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ep-comments__empty {
    margin: 4px 0 24px;
    color: var(--text-muted, #8a8a93);
    font-size: 15px;
}
.ep-comments__empty[hidden] { display: none; }

/* ---- single comment ---- */
.ep-comment { margin: 0; }

.ep-comment__body {
    background: var(--surface-2, rgba(255, 255, 255, .03));
    border: 1px solid var(--border, rgba(255, 255, 255, .08));
    border-radius: 14px;
    padding: 14px 16px;
}

.ep-comment__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ep-comment__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--surface-3, rgba(255, 255, 255, .06));
}

.ep-comment__author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text, #f4f4f6);
    text-transform: capitalize;
}

.ep-comment__date,
.ep-comment__edited {
    font-size: 12px;
    color: var(--text-muted, #8a8a93);
}

.ep-comment__anchor {
    margin-left: auto;
    color: var(--text-muted, #8a8a93);
    text-decoration: none;
    opacity: 0;
    transition: opacity .15s ease;
}
.ep-comment__body:hover .ep-comment__anchor { opacity: 1; }

.ep-comment__text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text, #e9e9ee);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.ep-comment__text p { margin: 0 0 .6em; }
.ep-comment__text p:last-child { margin-bottom: 0; }
.ep-comment__text a { color: var(--accent, #ff5a3c); }

.ep-comment__actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}
.ep-comment__reply,
.ep-comment__edit {
    font-size: 13px;
    color: var(--text-muted, #8a8a93);
    text-decoration: none;
    cursor: pointer;
}
.ep-comment__reply:hover,
.ep-comment__edit:hover { color: var(--accent, #ff5a3c); }

.ep-comment__children {
    margin: 16px 0 0;
    padding-left: 20px;
    border-left: 2px solid var(--border, rgba(255, 255, 255, .08));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ep-comment--guest .ep-comment__author { font-weight: 500; }
.ep-comment--new > .ep-comment__body {
    border-color: var(--accent, #ff5a3c);
    animation: ep-comment-flash 1.4s ease;
}
@keyframes ep-comment-flash {
    from { background: rgba(255, 90, 60, .12); }
    to   { background: var(--surface-2, rgba(255, 255, 255, .03)); }
}

/* ---- form ---- */
.ep-comments__form {
    margin-top: 28px;
    background: var(--surface-2, rgba(255, 255, 255, .03));
    border: 1px solid var(--border, rgba(255, 255, 255, .08));
    border-radius: 16px;
    padding: 20px;
}

.ep-comments__form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}
@media (max-width: 600px) {
    .ep-comments__form-row { grid-template-columns: minmax(0, 1fr); }
}

.ep-field { margin-bottom: 14px; }
.ep-field label {
    display: block;
    font-size: 13px;
    color: var(--text-muted, #8a8a93);
    margin-bottom: 6px;
}
.ep-field input[type="text"],
.ep-field input[type="email"],
.ep-field textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-1, rgba(0, 0, 0, .25));
    border: 1px solid var(--border, rgba(255, 255, 255, .12));
    border-radius: 10px;
    padding: 11px 13px;
    color: var(--text, #f4f4f6);
    font-size: 15px;
    font-family: inherit;
    transition: border-color .15s ease;
}
.ep-field textarea { resize: vertical; min-height: 96px; }
.ep-field input:focus,
.ep-field textarea:focus {
    outline: none;
    border-color: var(--accent, #ff5a3c);
}
.ep-field input::placeholder,
.ep-field textarea::placeholder { color: var(--text-muted, #6b6b73); }

.ep-field--invalid input,
.ep-field--invalid textarea { border-color: #e5484d; }

.ep-field__error {
    display: block;
    font-size: 12px;
    color: #e5484d;
    margin-top: 5px;
    min-height: 0;
}
.ep-field__error:empty { margin-top: 0; }

.ep-comments__form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ep-comments__submit {
    background: var(--accent, #ff5a3c);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease, transform .05s ease;
}
.ep-comments__submit:hover { opacity: .9; }
.ep-comments__submit:active { transform: translateY(1px); }
.ep-comments__submit:disabled { opacity: .5; cursor: default; }

.ep-comments__status {
    font-size: 14px;
    color: var(--text-muted, #8a8a93);
}
.ep-comments__status--ok { color: #46a758; }
.ep-comments__status--err { color: #e5484d; }

/* reply banner */
.ep-comments__reply-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted, #8a8a93);
    background: var(--surface-1, rgba(0, 0, 0, .25));
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
}
.ep-comments__reply-banner[hidden] { display: none; }
.ep-comments__reply-to { color: var(--text, #f4f4f6); font-weight: 600; }
.ep-comments__cancel-reply {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted, #8a8a93);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.ep-comments__cancel-reply:hover { color: var(--accent, #ff5a3c); }

.ep-field--captcha .ep-comments__captcha-img img {
    display: block;
    margin-bottom: 6px;
    border-radius: 6px;
}
