/**
 * Feed reflection (comments) modal — Figma
 */

.ye-feed-reflection-modal {
    position: fixed;
    inset: 0;
    z-index: 10090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ye-feed-reflection-modal[hidden] {
    display: none !important;
}

.ye-feed-reflection-modal__overlay {
    position: fixed;
    inset: 0;
    z-index: 10089;
    background: rgba(8, 27, 51, 0.45);
}

.ye-feed-reflection-modal__panel {
    position: relative;
    z-index: 10091;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(835px, calc(100vw - 48px));
    height: min(900px, calc(100vh - 48px));
    max-height: calc(100vh - 48px);
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.ye-feed-reflection-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.ye-feed-reflection-modal__close:hover {
    color: #081b33;
    background: #f3f4f6;
}

.ye-feed-reflection-modal__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.ye-feed-reflection-modal__post-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 36px;
}

.ye-feed-reflection-modal__avatar {
    width: 55px;
    height: 55px;
    border-radius: 18px;
    object-fit: cover;
    flex: 0 0 auto;
    opacity: 1;
}

.ye-feed-reflection-modal__comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
}

.ye-feed-reflection-modal__post-meta {
    min-width: 0;
    flex: 1;
}

.ye-feed-reflection-modal__post-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.ye-feed-reflection-modal__author-name {
    margin: 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.ye-feed-reflection-modal__badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #d9f4f0;
    color: #0f766e;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 4px 10px;
}

.ye-feed-reflection-modal__username-time {
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    color: #6b7280;
}

.ye-feed-reflection-modal__location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    color: #2563eb;
}

.ye-feed-reflection-modal__location img {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.ye-feed-reflection-modal__description {
    margin: 14px 0 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.65;
    color: #374151;
    white-space: pre-wrap;
}

.ye-feed-reflection-modal__hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    color: #2563eb;
}

.ye-feed-reflection-modal__image-wrap {
    width: 100%;
    max-width: 786px;
    margin-top: 14px;
}

.ye-feed-reflection-modal__image {
    display: block;
    width: 100%;
    height: 451px;
    max-height: min(451px, 50vh);
    object-fit: cover;
    background: #f3f4f6;
}

.ye-feed-reflection-modal__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
}

.ye-feed-reflection-modal__action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.ye-feed-reflection-modal__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ye-feed-reflection-modal__action--btn {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.ye-feed-reflection-modal__action--btn.is-loading {
    opacity: 0.6;
    cursor: wait;
}

.ye-feed-reflection-modal__action img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.ye-feed-reflection-modal__comments {
    display: flex;
    flex-direction: column;
    gap: 11.49px;
    margin-top: 16px;
}

.ye-feed-reflection-modal__comment {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11.49px;
    align-items: start;
}

.ye-feed-reflection-modal__comment-body {
    min-width: 0;
    max-width: 686px;
}

.ye-feed-reflection-modal__comment-bubble {
    box-sizing: border-box;
    min-height: 131px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f3f4f6;
}

.ye-feed-reflection-modal__comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ye-feed-reflection-modal__comment-name {
    margin: 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.ye-feed-reflection-modal__comment-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ye-feed-reflection-modal__comment-action {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.ye-feed-reflection-modal__comment-action--edit {
    color: #374151;
}

.ye-feed-reflection-modal__comment-action--delete {
    color: #ef4444;
}

.ye-feed-reflection-modal__comment-text {
    margin: 10px 0 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.55;
    color: #374151;
    white-space: pre-wrap;
}

.ye-feed-reflection-modal__comment-edit-input {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: vertical;
}

.ye-feed-reflection-modal__comment-time {
    margin: 6px 0 0 2px;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
    color: #9ca3af;
}

.ye-feed-reflection-modal__empty {
    margin: 8px 0 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #9ca3af;
}

.ye-feed-reflection-modal__error {
    margin: 12px 0 0;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #dc2626;
}

.ye-feed-reflection-modal__composer {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11.49px;
    align-items: start;
    margin-top: 16px;
    padding-top: 4px;
}

.ye-feed-reflection-modal__composer-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 686px;
}

.ye-feed-reflection-modal__composer-input {
    width: 100%;
    min-height: 88px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: vertical;
}

.ye-feed-reflection-modal__composer-input:focus {
    outline: none;
    border-color: #081b33;
    box-shadow: 0 0 0 3px rgba(8, 27, 51, 0.08);
}

.ye-feed-reflection-modal__composer-submit {
    align-self: flex-end;
    min-height: 40px;
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: #081b33;
    color: #ffffff;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.ye-feed-reflection-modal__composer-submit:hover:not(:disabled) {
    background: #0a1c30;
}

.ye-feed-reflection-modal__composer-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.ye-explorer-profile-page .ye-explorer-feed__action--btn {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

@media (max-width: 900px) {
    .ye-feed-reflection-modal {
        padding: 16px;
    }

    .ye-feed-reflection-modal__panel {
        width: min(835px, calc(100vw - 32px));
        height: min(900px, calc(100vh - 32px));
        padding: 20px 16px;
        border-radius: 24px;
    }

    .ye-feed-reflection-modal__image {
        height: min(451px, 40vh);
    }
}
