/* =========================
   Comments Section
   ========================= */
.comments-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comments-block {
    background-color: var(--color-white);
    border-radius: var(--radius-2xl);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comments-block__title {
    font-size: 24px;
    font-weight: 600;
    line-height: normal;
    color: var(--color-black);
    letter-spacing: -0.48px;
    margin: 0;
}

/* Comment Input */
/* Comment Form */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.comment-form__fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-form__field-wrapper {
    position: relative;
    width: 100%;
}

.comment-form__field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #E2E2E2;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--color-black);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.comment-form__field::placeholder {
    color: var(--color-text-grey);
}

.comment-form__field:focus {
    border-color: var(--color-black);
}

.comment-form__field--textarea {
    height: 100px;
    resize: vertical;
    min-height: 100px;
}

/* Error state */
.comment-form__field-wrapper--error .comment-form__field {
    border-color: #FF2626;
}

.comment-form__error {
    display: none;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: #FF2626;
    pointer-events: none;
}

.comment-form__field-wrapper--error .comment-form__error {
    display: block;
}

.comment-form__field--textarea+.comment-form__error {
    top: 12px;
    transform: none;
}

/* Submit section */
.comment-form__submit {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-form__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.16px;
    border: none;
    border-radius: 1000px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: fit-content;
}

.comment-form__button:hover {
    background-color: #1a6fe8;
}

.comment-form__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-form__consent {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #B0B0B0;
    margin: 0;
}

.comment-form__consent-link {
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.comment-form__consent-link:hover {
    opacity: 0.8;
}

/* Success state */
.comment-form__success {
    border: 1px solid #E2E2E2;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-form__success-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: var(--color-black);
    margin: 0;
}

.comment-form__success-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--color-black);
    margin: 0;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
}

/* Comment */
.comment {
    padding: 20px 0;
    border-top: 1px solid var(--color-border-secondary);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment:first-child {
    border-top: none;
    padding-top: 0;
}

.comment--reply {
    padding-left: 40px;
}

.comment__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.comment__author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment__school {
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment__school-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}

.comment__school-name {
    font-size: 17px;
    font-weight: 600;
    line-height: 24px;
    color: var(--color-black);
}

.comment__verified-icon {
    width: 13px;
    height: 13px;
    color: var(--color-primary);
}

.comment__author {
    font-size: 17px;
    font-weight: 600;
    line-height: 24px;
    color: var(--color-black);
}

.comment__date {
    font-size: 14px;
    font-weight: 400;
    line-height: 23px;
    color: var(--color-text-grey);
    letter-spacing: -0.14px;
}

.comment__badge {
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    padding: 2px 8px 5px;
    border-radius: 1000px;
}

.comment__badge--official {
    color: #B0B0B0;
    background: transparent;
    padding: 0;
}

.comment__badge--author {
    color: var(--color-primary);
    background-color: rgba(43, 127, 255, 0.1);
    letter-spacing: -0.14px;
}

.comment__body {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--color-black);
}

.comment__body p {
    margin: 0 0 10px;
}

.comment__body p:last-child {
    margin-bottom: 0;
}

.comment__reply-btn {
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: var(--color-text-grey);
    letter-spacing: -0.15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color 0.2s;
}

.comment__reply-btn:hover {
    color: var(--color-primary);
}

/* Load More Comments */
.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background-color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-more-btn:hover {
    background-color: #F5F5F5;
}

.load-more-btn__icon {
    width: 20px;
    height: 20px;
    color: var(--color-black);
}

.load-more-btn__text {
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    color: var(--color-black);
    letter-spacing: -0.16px;
}

/*  */

@media (max-width: 768px) {
    .comments-block__title {
        font-size: 20px;
    }

    .comments-block {
        padding: 20px;
    }
}