.all-comments__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.all-comments__header p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}
.all-comments__header a {
    color: #333;
}
.all-comments__title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #3b7dd8;
    margin: 20px 0;
}

/* Mini pasek inline na końcu listy */
.comment-bar {
    display: flex;
    align-items: center;
    margin-top: 20px;
    padding: 10px 16px;
    gap: 10px;
    cursor: pointer;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.comment-bar__input {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 16px;
    gap: 10px;
}
.comment-bar__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-bar__placeholder {
    color: #999;
    font-size: 14px;
}
.comment-bar__send {
    background: #3b7dd8;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
.comment-bar__send:hover {
    background: #2e6bc4;
}

/* Overlay */
.comment-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.comment-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal wyjeżdżający od dołu */
.comment-modal {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 770px;
    z-index: 9999;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.comment-modal.is-open {
    transform: translate(-50%, 0);
}
.comment-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}
.comment-modal__header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}
.comment-modal__close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.comment-modal__close:hover {
    color: #333;
}
.comment-modal__body {
    padding: 20px;
}
/* Po id, nie po kontenerze — ten sam formularz zyje w modalu (?komentarze)
   i inline na gorze podstrony /komentarze/{slug}. */
#all-comments-form input[type="text"],
#all-comments-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}
#all-comments-form textarea {
    resize: vertical;
    min-height: 110px;
}
#all-comments-form .g-recaptcha,
#all-comments-form .cf-turnstile {
    margin: 10px 0;
}

/* Formularz inline: kontener zastepuje padding modala. */
.all-comments__add {
    padding: 20px;
    margin-bottom: 25px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
}

/* Body scroll lock */
body.comment-modal-active {
    overflow: hidden;
}

.all-comments__submit-btn {
    width: 100%;
    background: #3b7dd8;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
}
.all-comments__submit-btn:hover {
    background: #2e6bc4;
}
.all-comments__add-notice {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 10px 15px;
    margin: 15px 0 10px;
    font-size: 13px;
    color: #333;
    border-radius: 0 4px 4px 0;
}
.all-comments__add-legal {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}
.all-comments__add-legal a {
    color: #3b7dd8;
    font-weight: 600;
}
.comments-email-wrapper {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}
