/* Kadence Downloadable Child comments - ported from the approved Downly APK comment UI. */

/* Compact hand-off from the final APK card. */
body.kadence-downly-software-single #comments,
body.kadence-downly-software-single .comments-area {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--global-palette4, #334155);
}

body.kadence-downly-software-single #comments .comments-title,
body.kadence-downly-software-single .comments-area .comments-title {
    display: none !important;
}

body.kadence-downly-software-single #comments .comment-reply-title,
body.kadence-downly-software-single .comments-area .comment-reply-title {
    margin: 0 0 9px !important;
    padding: 0 0 9px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--global-gray-400, #d9e2ec) !important;
    color: var(--global-palette3, #0f172a);
    font-family: inherit;
    font-size: clamp(1.15rem, 2vw, 1.42rem);
    font-weight: 850;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Existing comments remain lightweight and unboxed. */
body.kadence-downly-software-single #comments .comment-list,
body.kadence-downly-software-single .comments-area .comment-list {
    display: grid;
    gap: 0;
    margin: 0 0 14px !important;
    padding: 0 !important;
    list-style: none;
}

body.kadence-downly-software-single #comments .comment-list > li,
body.kadence-downly-software-single .comments-area .comment-list > li {
    margin: 0 !important;
    padding: 0 !important;
}

body.kadence-downly-software-single #comments .comment-list .children,
body.kadence-downly-software-single .comments-area .comment-list .children {
    display: grid;
    gap: 0;
    margin: 0 0 0 clamp(18px, 4vw, 42px) !important;
    padding: 0 !important;
    list-style: none;
}

body.kadence-downly-software-single #comments .comment-body,
body.kadence-downly-software-single .comments-area .comment-body {
    position: relative;
    min-height: 76px;
    margin: 0 !important;
    padding: 18px 54px 20px 68px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--global-gray-400, #d9e2ec) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.kadence-downly-software-single #comments .comment-author .avatar,
body.kadence-downly-software-single .comments-area .comment-author .avatar {
    position: absolute;
    top: 18px;
    left: 0;
    width: 46px;
    height: 46px;
    margin: 0;
    border: 2px solid var(--global-palette9, #ffffff);
    border-radius: 999px;
    background: var(--global-palette8, #f8fafc);
    box-shadow: 0 4px 11px rgba(15, 23, 42, 0.09);
}

body.kadence-downly-software-single #comments .comment-author,
body.kadence-downly-software-single .comments-area .comment-author {
    color: var(--global-palette3, #0f172a);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.35;
}

body.kadence-downly-software-single #comments .comment-author a,
body.kadence-downly-software-single .comments-area .comment-author a,
body.kadence-downly-software-single #comments .comment-metadata a,
body.kadence-downly-software-single .comments-area .comment-metadata a {
    color: inherit;
    text-decoration: none;
}

body.kadence-downly-software-single #comments .comment-metadata,
body.kadence-downly-software-single .comments-area .comment-metadata {
    margin-top: 2px;
    color: var(--global-palette5, #64748b);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.4;
}

body.kadence-downly-software-single #comments .comment-content,
body.kadence-downly-software-single .comments-area .comment-content {
    margin-top: 10px;
    color: var(--global-palette4, #334155);
    line-height: 1.72;
}

body.kadence-downly-software-single #comments .comment-content p:last-child,
body.kadence-downly-software-single .comments-area .comment-content p:last-child {
    margin-bottom: 0;
}

body.kadence-downly-software-single #comments .reply,
body.kadence-downly-software-single .comments-area .reply {
    position: absolute;
    top: 18px;
    right: 0;
    margin: 0;
}

body.kadence-downly-software-single #comments .comment-reply-link,
body.kadence-downly-software-single .comments-area .comment-reply-link {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border: 1px solid color-mix(in srgb, var(--global-palette1, #1764ff) 26%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--global-palette1, #1764ff) 4%, transparent);
    color: var(--global-palette2, #0d55f2);
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

/* The reply form itself has no extra card or inherited top gap. */
body.kadence-downly-software-single #comments .comment-respond,
body.kadence-downly-software-single .comments-area .comment-respond {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.kadence-downly-software-single #comments .comment-list + .comment-respond,
body.kadence-downly-software-single .comments-area .comment-list + .comment-respond {
    margin-top: 14px !important;
}

body.kadence-downly-software-single #comments .comment-notes,
body.kadence-downly-software-single #comments .logged-in-as,
body.kadence-downly-software-single .comments-area .comment-notes,
body.kadence-downly-software-single .comments-area .logged-in-as {
    color: var(--global-palette5, #64748b);
    font-size: 0.80rem;
    line-height: 1.45;
}

/*
 * Stable desktop form grid.
 *
 * The child theme now outputs each standard field as a direct form child. This
 * three-column grid therefore fills the entire row without relying on Kadence's
 * wrappers, floats, intrinsic widths or field order.
 */
body.kadence-downly-software-single #comments form.comment-form,
body.kadence-downly-software-single .comments-area form.comment-form {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    column-gap: 18px !important;
    row-gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: start !important;
}

body.kadence-downly-software-single #comments form.comment-form > p,
body.kadence-downly-software-single .comments-area form.comment-form > p {
    position: static !important;
    display: block !important;
    float: none !important;
    clear: none !important;
    flex: none !important;
    align-self: start !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

body.kadence-downly-software-single #comments form.comment-form > .comment-notes,
body.kadence-downly-software-single #comments form.comment-form > .logged-in-as,
body.kadence-downly-software-single #comments form.comment-form > .comment-form-comment,
body.kadence-downly-software-single #comments form.comment-form > .comment-form-cookies-consent,
body.kadence-downly-software-single #comments form.comment-form > .form-submit,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-notes,
body.kadence-downly-software-single .comments-area form.comment-form > .logged-in-as,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-comment,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-cookies-consent,
body.kadence-downly-software-single .comments-area form.comment-form > .form-submit {
    grid-column: 1 / -1 !important;
}

body.kadence-downly-software-single #comments form.comment-form > .comment-form-author,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-author {
    grid-column: 1 !important;
}

body.kadence-downly-software-single #comments form.comment-form > .comment-form-email,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-email {
    grid-column: 2 !important;
}

body.kadence-downly-software-single #comments form.comment-form > .comment-form-url,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-url {
    grid-column: 3 !important;
}

/* Neutralise common Kadence/optimiser wrappers if one is inserted externally. */
body.kadence-downly-software-single #comments form.comment-form > .comment-input-wrap,
body.kadence-downly-software-single #comments form.comment-form > .comment-form-fields,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-input-wrap,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-fields {
    display: contents !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Labels are permanent and always sit above their own controls. */
body.kadence-downly-software-single #comments form.comment-form label,
body.kadence-downly-software-single .comments-area form.comment-form label {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--global-palette4, #334155) !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
}

body.kadence-downly-software-single #comments input::placeholder,
body.kadence-downly-software-single #comments textarea::placeholder,
body.kadence-downly-software-single .comments-area input::placeholder,
body.kadence-downly-software-single .comments-area textarea::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

body.kadence-downly-software-single #comments form.comment-form input[type="text"],
body.kadence-downly-software-single #comments form.comment-form input[type="email"],
body.kadence-downly-software-single #comments form.comment-form input[type="url"],
body.kadence-downly-software-single #comments form.comment-form textarea,
body.kadence-downly-software-single .comments-area form.comment-form input[type="text"],
body.kadence-downly-software-single .comments-area form.comment-form input[type="email"],
body.kadence-downly-software-single .comments-area form.comment-form input[type="url"],
body.kadence-downly-software-single .comments-area form.comment-form textarea {
    position: static !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 11px 13px !important;
    border: 1px solid var(--global-gray-400, #cbd5e1) !important;
    border-radius: 9px !important;
    background: var(--global-palette9, #ffffff) !important;
    color: var(--global-palette3, #0f172a) !important;
    box-shadow: none !important;
    font: inherit !important;
    line-height: 1.45 !important;
    transform: none !important;
}

body.kadence-downly-software-single #comments form.comment-form input[type="text"],
body.kadence-downly-software-single #comments form.comment-form input[type="email"],
body.kadence-downly-software-single #comments form.comment-form input[type="url"],
body.kadence-downly-software-single .comments-area form.comment-form input[type="text"],
body.kadence-downly-software-single .comments-area form.comment-form input[type="email"],
body.kadence-downly-software-single .comments-area form.comment-form input[type="url"] {
    height: 48px !important;
    min-height: 48px !important;
}

body.kadence-downly-software-single #comments form.comment-form textarea,
body.kadence-downly-software-single .comments-area form.comment-form textarea {
    height: 168px !important;
    min-height: 168px !important;
    resize: vertical;
}

body.kadence-downly-software-single #comments form.comment-form input:focus,
body.kadence-downly-software-single #comments form.comment-form textarea:focus,
body.kadence-downly-software-single .comments-area form.comment-form input:focus,
body.kadence-downly-software-single .comments-area form.comment-form textarea:focus {
    border-color: #4d7df4 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(77, 125, 244, 0.12) !important;
}

body.kadence-downly-software-single #comments form.comment-form > .comment-form-cookies-consent,
body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-cookies-consent {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

body.kadence-downly-software-single #comments .comment-form-cookies-consent input,
body.kadence-downly-software-single .comments-area .comment-form-cookies-consent input {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 3px 0 0 !important;
}

body.kadence-downly-software-single #comments .comment-form-cookies-consent label,
body.kadence-downly-software-single .comments-area .comment-form-cookies-consent label {
    margin: 0 !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
}

body.kadence-downly-software-single #comments .submit,
body.kadence-downly-software-single #comments input[type="submit"],
body.kadence-downly-software-single .comments-area .submit,
body.kadence-downly-software-single .comments-area input[type="submit"] {
    appearance: none;
    display: inline-flex !important;
    width: auto !important;
    min-width: 170px !important;
    max-width: 100% !important;
    min-height: 48px !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 12px 21px !important;
    border: 1px solid var(--global-palette1, #1764ff) !important;
    border-radius: 11px !important;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--global-palette1, #1764ff) 82%, #ffffff) 0%,
        var(--global-palette1, #1764ff) 50%,
        var(--global-palette2, #0d55f2) 100%
    ) !important;
    color: var(--global-palette9, #ffffff) !important;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--global-palette2, #0d55f2) 22%, transparent) !important;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transform: none !important;
}

body.kadence-downly-software-single #comments .submit:hover,
body.kadence-downly-software-single #comments input[type="submit"]:hover,
body.kadence-downly-software-single .comments-area .submit:hover,
body.kadence-downly-software-single .comments-area input[type="submit"]:hover {
    border-color: var(--global-palette2, #0d55f2) !important;
    background: linear-gradient(
        135deg,
        var(--global-palette1, #1764ff) 0%,
        var(--global-palette2, #0d55f2) 50%,
        color-mix(in srgb, var(--global-palette2, #0d55f2) 88%, #000000) 100%
    ) !important;
    color: var(--global-palette9, #ffffff) !important;
    box-shadow: 0 7px 17px color-mix(in srgb, var(--global-palette2, #0d55f2) 26%, transparent) !important;
    transform: none !important;
}

body.kadence-downly-software-single #comments .no-comments,
body.kadence-downly-software-single .comments-area .no-comments {
    margin: 0 !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--global-gray-400, #d9e2ec) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--global-palette5, #64748b);
    font-weight: 700;
}

@media (max-width: 760px) {
    body.kadence-downly-software-single #comments form.comment-form,
    body.kadence-downly-software-single .comments-area form.comment-form {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    body.kadence-downly-software-single #comments form.comment-form > .comment-form-author,
    body.kadence-downly-software-single #comments form.comment-form > .comment-form-email,
    body.kadence-downly-software-single #comments form.comment-form > .comment-form-url,
    body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-author,
    body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-email,
    body.kadence-downly-software-single .comments-area form.comment-form > .comment-form-url {
        grid-column: 1 / -1 !important;
    }

    body.kadence-downly-software-single #comments form.comment-form textarea,
    body.kadence-downly-software-single .comments-area form.comment-form textarea {
        height: 150px !important;
        min-height: 150px !important;
    }
}

@media (max-width: 600px) {
    body.kadence-downly-software-single #comments .comment-body,
    body.kadence-downly-software-single .comments-area .comment-body {
        padding: 16px 0 18px !important;
    }

    body.kadence-downly-software-single #comments .comment-author .avatar,
    body.kadence-downly-software-single .comments-area .comment-author .avatar {
        position: static;
        float: left;
        width: 40px;
        height: 40px;
        margin: 0 10px 7px 0;
    }

    body.kadence-downly-software-single #comments .reply,
    body.kadence-downly-software-single .comments-area .reply {
        position: static;
        margin-top: 10px;
    }

    body.kadence-downly-software-single #comments .comment-list .children,
    body.kadence-downly-software-single .comments-area .comment-list .children {
        margin-left: 13px !important;
    }

    body.kadence-downly-software-single #comments .submit,
    body.kadence-downly-software-single #comments input[type="submit"],
    body.kadence-downly-software-single .comments-area .submit,
    body.kadence-downly-software-single .comments-area input[type="submit"] {
        width: 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.kadence-downly-software-single #comments *,
    body.kadence-downly-software-single .comments-area * {
        transition: none !important;
    }
}


/* Downly comment card refinement v0.0.25 */
body.kadence-downly-software-single #comments .comment-list > li > .comment-body,
body.kadence-downly-software-single .comments-area .comment-list > li > .comment-body {
    margin: 0 0 16px !important;
    padding: 18px 22px 18px 84px !important;
    min-height: 86px;
    border: 1px solid var(--global-gray-300, #e5e7eb) !important;
    border-radius: 16px !important;
    background: var(--global-palette8, #f7fafc) !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06) !important;
}

body.kadence-downly-software-single #comments .comment-list > li > .comment-body:hover,
body.kadence-downly-software-single .comments-area .comment-list > li > .comment-body:hover {
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08) !important;
}

body.kadence-downly-software-single #comments .comment-author .avatar,
body.kadence-downly-software-single .comments-area .comment-author .avatar {
    top: 20px;
    left: 20px;
}

body.kadence-downly-software-single #comments .comment-meta,
body.kadence-downly-software-single .comments-area .comment-meta {
    margin-bottom: 8px !important;
}

body.kadence-downly-software-single #comments .comment-content,
body.kadence-downly-software-single .comments-area .comment-content {
    margin-top: 8px !important;
}

body.kadence-downly-software-single #comments .comment-reply-link,
body.kadence-downly-software-single .comments-area .comment-reply-link {
    display: none !important;
}

body.kadence-downly-software-single #comments .comment-form {
    padding: 22px !important;
    border: 1px solid var(--global-gray-300, #e5e7eb);
    border-radius: 18px;
    background: var(--global-palette8, #f7fafc);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body.kadence-downly-software-single #comments .comment-form textarea,
body.kadence-downly-software-single #comments .comment-form input {
    border-radius: 10px;
}

/* v0.0.11 — remove duplicate review/comment canvases and drop shadows. */
body.kadence-downly-software-single .dsoft-pixel-reviews #comments,
body.kadence-downly-software-single .dsoft-pixel-reviews .comments-area,
body.kadence-downly-software-single .dsoft-pixel-reviews .comment-respond,
body.kadence-downly-software-single .dsoft-pixel-reviews form.comment-form {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.kadence-downly-software-single .dsoft-pixel-reviews form.comment-form {
    padding: 0 !important;
}

body.kadence-downly-software-single .dsoft-pixel-reviews .comment-list > li > .comment-body,
body.kadence-downly-software-single .dsoft-pixel-reviews .comment-body {
    border: 0 !important;
    border-bottom: 1px solid var(--global-gray-300, #e5e7eb) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.kadence-downly-software-single .dsoft-pixel-reviews .comment-list > li > .comment-body:hover,
body.kadence-downly-software-single .dsoft-pixel-reviews .comment-body:hover {
    box-shadow: none !important;
}

body.kadence-downly-software-single .dsoft-pixel-reviews .comment-reply-title {
    margin-top: 0 !important;
}
