/**
 * Comments — form + lista do single post.
 */

/* === Wrapper === */
.comments {
    max-width: 44rem;
    margin: 4rem auto 0;
    padding: 0 1.5rem;
}
.comments-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--slate-100);
}
.comments-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--slate-900);
}
.comments-count {
    font-size: 0.8125rem;
    color: var(--slate-500);
}

/* === Form ===
 * Layout em grid 2-col em desktop: textarea / submit / fields cookie /
 * url ocupam linha cheia; author + email dividem a primeira linha de
 * fields lado-a-lado. Em mobile (<640px) tudo vira 1-col.
 */
.comment-form {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .comment-form {
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
    }
}
.comment-form > * { min-width: 0; }
/* Itens full-width (span all cols) */
.comment-form textarea#comment-body,
.comment-form .comment-form-url,
.comment-form .comment-form-cookies-consent,
.comment-form .comment-form-foot,
.comment-form .form-submit,
.comment-form #wp-comment-cookies-consent + label {
    grid-column: 1 / -1;
}
/* Author + Email lado-a-lado em desktop */
@media (min-width: 640px) {
    .comment-form .comment-form-author { grid-column: 1; }
    .comment-form .comment-form-email  { grid-column: 2; }
}

.comment-form textarea#comment-body {
    width: 100%;
    min-height: 6rem;
    padding: 0.875rem 1rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 0.625rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--slate-900);
    resize: vertical;
    box-sizing: border-box;
}
.comment-form textarea#comment-body:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(52, 132, 196, 0.12);
}
.comment-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.comment-form-hint {
    font-size: 0.75rem;
    color: var(--slate-500);
}
/* Submit do form de comentários. Especificidade alta + !important pra
 * vencer reset/base do Hello Biz parent que estiliza button,
 * [type="submit"], [type="button"] globalmente. */
.comments .comment-form input.comment-submit,
.comments .comment-form input[type="submit"],
.comments .comment-form button[type="submit"],
input.comment-submit[type="submit"],
.comment-form-foot input[type="submit"] {
    background: var(--blue) !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 0.625rem 1.125rem !important;
    border-radius: 0.5rem !important;
    border: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
.comments .comment-form input.comment-submit:hover,
.comments .comment-form input[type="submit"]:hover,
.comments .comment-form button[type="submit"]:hover,
input.comment-submit[type="submit"]:hover,
.comment-form-foot input[type="submit"]:hover {
    background: var(--blue-dark) !important;
    color: #fff !important;
}
.comments .comment-form input.comment-submit:focus,
.comments .comment-form input[type="submit"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(52, 132, 196, 0.25) !important;
}

/* WP-injected fields (logged-out commenters) — <p> wrappers */
.comment-form p {
    margin: 0;
}
.comment-form p label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-600);
    margin-bottom: 0.25rem;
}
.comment-form p label .required { color: #B91C1C; }

/* Inputs: força width 100% pra ignorar o size="30" do HTML do WP */
.comment-form p input[type="text"],
.comment-form p input[type="email"],
.comment-form p input[type="url"] {
    width: 100% !important;
    max-width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--slate-200);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #fff;
    font-family: inherit;
    color: var(--slate-900);
    box-sizing: border-box;
}
.comment-form p input[type="text"]:focus,
.comment-form p input[type="email"]:focus,
.comment-form p input[type="url"]:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(52, 132, 196, 0.12);
}

.comment-form p.comment-form-cookies-consent {
    font-size: 0.75rem;
    color: var(--slate-500);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.comment-form p.comment-form-cookies-consent input {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* === Lista === */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.comment {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.875rem;
    align-items: start;
}
.comment .avatar {
    width: 2.25rem !important;
    height: 2.25rem !important;
}
.comment-head {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-bottom: 0.375rem;
}
.comment-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-900);
}
.comment-time {
    font-size: 0.75rem;
    color: var(--slate-500);
}
.comment-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--slate-700);
    margin: 0;
}
.comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.625rem;
}
.comment-actions button {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-500);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s;
    font-family: inherit;
}
.comment-actions button:hover:not(:disabled) { color: var(--blue); }
.comment-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
