/* =========================================================
   Azami Tarot Comments
   通常記事用コメント欄とは独立したタロット専用デザイン
========================================================= */

.azt-comment-board {
    --azt-comment-text: #51434a;
    --azt-comment-text-soft: #6f5d65;
    --azt-comment-pink: #df628f;
    --azt-comment-pink-deep: #d94f83;
    --azt-comment-pink-line: #f2aac0;
    --azt-comment-pink-pale: #fff3f7;
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 56px auto 0;
    padding: 0;
    overflow: visible;
    color: var(--azt-comment-text);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.azt-comment-board *,
.azt-comment-board *::before,
.azt-comment-board *::after {
    box-sizing: border-box;
}

/* 導入見出し */
.azt-comment-intro {
    max-width: none;
    margin: 0 0 2rem;
    text-align: left;
}

.azt-comment-board .azt-comment-title {
    margin: 0;
    padding: 0.28rem 0 0.28rem 1rem;
    color: #453d41;
    border: 0;
    border-left: 3px solid #ee8eaf;
    background: none;
    font-family: inherit;
    font-size: clamp(1.3rem, 2.8vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.55;
}

.azt-comment-board .azt-comment-title::before,
.azt-comment-board .azt-comment-title::after {
    display: none;
    content: none;
}

.azt-comment-board .azt-comment-lead {
    margin: 1.25rem 0 0;
    color: #5e4a52;
    font-size: 0.94rem;
    line-height: 2;
}

/* 投稿フォーム */
.azt-comment-formBox {
    margin: 0 0 2.15rem;
}

.azt-comment-board .comment-respond {
    position: relative;
    margin: 0;
    padding: clamp(1.4rem, 3.2vw, 2rem);
    overflow: hidden;
    border: 1px solid var(--azt-comment-pink-line);
    border-radius: 20px;
    background:
        radial-gradient(circle at 78% 35%, rgba(255, 255, 255, 0.94) 0, rgba(255, 255, 255, 0.44) 31%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(135deg, #fffafd 0%, #fff2f7 100%);
    box-shadow:
        0 10px 24px rgba(205, 102, 139, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.azt-comment-board .azt-comment-form__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    margin: 0 0 1.25rem;
    padding: 0;
    color: var(--azt-comment-pink);
    border: 0;
    background: none;
    font-family: inherit;
    font-size: clamp(1.12rem, 2.4vw, 1.35rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.45;
}

.azt-comment-board .azt-comment-form__title::before {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 0.1rem;
    flex: 0 0 30px;
    background: url("images/comment-title-icon.png") no-repeat center;
    background-size: contain;
    content: "";
}

.azt-comment-board .azt-comment-form__title::after {
    display: none;
    content: none;
}

.azt-comment-board .azt-comment-form__title small {
    margin-left: auto;
    font-size: 0.76rem;
    font-weight: 700;
}

.azt-comment-board #cancel-comment-reply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 14px;
    color: #aa637c;
    border: 1px solid #efd0da;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(126, 71, 91, 0.06);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.azt-comment-board .azt-comment-form {
    margin: 0;
}

.azt-comment-board .azt-comment-form__row {
    display: block;
    margin: 0 0 1rem;
}

.azt-comment-board .azt-comment-form__row label {
    display: block;
    margin: 0 0 0.55rem;
    color: #3f3338;
    font-size: 0.9rem;
    font-weight: 700;
}

.azt-comment-board .azt-comment-form__row label span:not(.required) {
    color: #9e8992;
    font-size: 0.8rem;
    font-weight: 400;
}

.azt-comment-board .required {
    color: #dd6f95;
}

.azt-comment-board .logged-in-as {
    margin: 0 0 1.25rem;
    color: #5e5157;
    font-size: 0.9rem;
    line-height: 1.9;
}

.azt-comment-board .logged-in-as a {
    text-underline-offset: 0.18em;
}

.azt-comment-board textarea,
.azt-comment-board input[type="text"] {
    display: block;
    width: 100%;
    margin: 0;
    color: #4c3f45;
    border: 1px solid #efbfcd;
    border-radius: 9px;
    outline: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: inset 0 1px 3px rgba(126, 71, 91, 0.05);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.75;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.azt-comment-board textarea {
    min-height: 170px;
    padding: 0.9rem 1rem;
    resize: vertical;
}

.azt-comment-board input[type="text"] {
    min-height: 44px;
    padding: 0.65rem 0.85rem;
}

.azt-comment-board textarea::placeholder,
.azt-comment-board input[type="text"]::placeholder {
    color: #b8a4ad;
}

.azt-comment-board textarea:focus,
.azt-comment-board input[type="text"]:focus {
    border-color: #e4779c;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(228, 119, 156, 0.13),
        inset 0 1px 3px rgba(126, 71, 91, 0.04);
}

.azt-comment-board .form-submit {
    margin: 1.35rem 0 0;
    text-align: center;
}

.azt-comment-board .azt-comment-submit {
    min-width: 260px;
    min-height: 48px;
    padding: 0.75rem 2rem;
    color: #fff;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ed7fa4 0%, var(--azt-comment-pink-deep) 100%);
    box-shadow: 0 10px 20px rgba(216, 79, 131, 0.22);
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    cursor: pointer;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
}

.azt-comment-board .azt-comment-submit:hover {
    opacity: 0.96;
    box-shadow: 0 13px 24px rgba(216, 79, 131, 0.28);
    transform: translateY(-1px);
}

.azt-comment-board .azt-comment-submit:focus-visible,
.azt-comment-board textarea:focus-visible,
.azt-comment-board input[type="text"]:focus-visible,
.azt-comment-board .azt-comment-reaction:focus-visible,
.azt-comment-board .comment-reply-link:focus-visible {
    outline: 3px solid rgba(228, 119, 156, 0.28);
    outline-offset: 3px;
}

.azt-comment-board .azt-comment-note {
    margin: 0.9rem 0 0;
    color: #927d86;
    font-size: 0.76rem;
    line-height: 1.7;
    text-align: center;
}

.azt-comment-empty,
.azt-comment-closed {
    margin: 1rem 0 0;
    padding: 1rem;
    color: #806d76;
    border: 1px dashed #efbdcd;
    border-radius: 13px;
    background: rgba(255, 248, 251, 0.72);
    font-size: 0.86rem;
    line-height: 1.75;
    text-align: center;
}

/* コメント一覧 */
.azt-comment-listHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2.1rem 0 0.9rem;
}

.azt-comment-board .azt-comment-listTitle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    color: #4f3e46;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.5;
}

.azt-comment-board .azt-comment-listTitle::before {
    display: inline;
    color: inherit;
    content: "💬";
    font-size: 0.95em;
}

.azt-comment-board .azt-comment-listTitle::after {
    display: none;
    content: none;
}

.azt-comment-listTitle span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    margin-left: 0.25rem;
    padding: 3px 10px;
    color: #a65c78;
    border: 0;
    border-radius: 999px;
    background: #f7e4eb;
    font-size: 0.72rem;
}

.azt-comment-list,
.azt-comment-list .children {
    margin: 0;
    padding: 0;
    list-style: none;
}

.azt-comment-list .children {
    margin: 0.9rem 0 0 3.5rem;
    padding-left: 1.1rem;
    border-left: 1px dashed #efadc2;
}

.azt-comment-item {
    margin: 0 0 0.9rem;
}

.azt-comment-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid #f0dce3;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 16px rgba(126, 71, 91, 0.065);
}

.azt-comment-avatar {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.azt-comment-avatarMark,
.azt-comment-adminAvatar {
    display: block;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
}

.azt-comment-avatarMark {
    overflow: hidden;
    color: transparent;
    border: 0;
    background: url("images/comment-icon.png") no-repeat center;
    background-size: cover;
    box-shadow: none;
    font-size: 0;
}

.azt-comment-adminAvatar {
    border: 2px solid #fff;
    box-shadow: 0 3px 8px rgba(126, 71, 91, 0.14);
    object-fit: cover;
}

.azt-comment-content {
    min-width: 0;
}

.azt-comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    margin: 0 0 0.5rem;
}

.azt-comment-author {
    color: #4c3b43;
    font-size: 0.88rem;
    font-weight: 700;
}

.azt-comment-date {
    color: #a39099;
    font-size: 0.74rem;
    text-decoration: none;
}

.azt-comment-awaiting {
    margin: 0.45rem 0;
    padding: 0.5rem 0.65rem;
    color: #9b7634;
    border-radius: 8px;
    background: #fff7df;
    font-size: 0.78rem;
}

.azt-comment-body {
    color: #55484e;
    font-size: 0.88rem;
    line-height: 1.9;
}

.azt-comment-body p {
    margin: 0 0 0.75em;
}

.azt-comment-body p:last-child {
    margin-bottom: 0;
}

.azt-comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.azt-comment-reaction,
.azt-comment-actions .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-height: 34px;
    padding: 6px 12px;
    color: #aa637c;
    border: 1px solid #efd0da;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(126, 71, 91, 0.05);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}

.azt-comment-reaction {
    cursor: pointer;
}

.azt-comment-reactionIcon {
    color: #e26e95;
    font-size: 0.95rem;
}

.azt-comment-reactionCount {
    min-width: 1em;
    color: #d55f87;
}

.azt-comment-reaction:hover,
.azt-comment-actions .comment-reply-link:hover {
    border-color: #e9b6c8;
    background: #fff9fb;
    transform: translateY(-1px);
}

.azt-comment-reaction.is-reacted {
    color: #c75f84;
    border-color: #e9b6c8;
    background: #fff5f8;
}

.azt-comment-reaction.is-loading,
.azt-comment-reaction:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.azt-comment-actions .comment-reply-link::before {
    content: "↩";
}

.azt-comment-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.azt-comment-nav a {
    color: #b35d7b;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.azt-comment-item .comment-respond {
    margin-top: 0.9rem;
}

@media (max-width: 720px) {
    .azt-comment-board {
        margin-top: 42px;
    }

    .azt-comment-intro {
        margin-bottom: 1.5rem;
    }

    .azt-comment-board .azt-comment-title {
        padding-left: 0.75rem;
        font-size: 1.18rem;
    }

    .azt-comment-board .azt-comment-lead {
        margin-top: 1rem;
        font-size: 0.85rem;
        line-height: 1.9;
    }

    .azt-comment-board .comment-respond {
        padding: 1.2rem 1rem 1.25rem;
        border-radius: 17px;
    }

    .azt-comment-board .azt-comment-form__title {
        font-size: 1.05rem;
    }

    .azt-comment-board .azt-comment-form__title::before {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .azt-comment-board textarea {
        min-height: 145px;
    }

    .azt-comment-board .azt-comment-submit {
        width: 100%;
        min-width: 0;
    }

    .azt-comment-list .children {
        margin-left: 1.15rem;
        padding-left: 0.7rem;
    }

    .azt-comment-card {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0.9rem;
    }

    .azt-comment-avatarMark,
    .azt-comment-adminAvatar {
        width: 42px !important;
        height: 42px !important;
    }

    .azt-comment-meta {
        display: block;
    }

    .azt-comment-date {
        display: block;
        margin-top: 0.18rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .azt-comment-board *,
    .azt-comment-board *::before,
    .azt-comment-board *::after {
        transition-duration: 1ms !important;
    }
}
