/* ── render_component.css ── */
/* QnA 프리뷰 (renderQnaArticlePreview) */
.partnership-preview-container {
    color: inherit;
    border-bottom: 1px solid rgb(var(--gray-100));
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 4px;
}
.partnership-preview-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.partnership-preview-right {
    flex-shrink: 0;
}

/* 공지사항 프리뷰 (renderNoticeArticlePreview) */
.notice-preview-container {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 0;
    border-bottom: 1px solid rgb(var(--gray-100));
    cursor: pointer;
}

/* 차단 목록 (renderBlockedUserItem) */
.block-list-item-container {
    border-bottom: 1px solid rgb(var(--gray-100));
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
}
.block-list-item-container img {
    width: 40px;
    height: 40px;
    border-radius: 100%;
    object-fit: cover;
}
.block-list-item-container button {
    background-color: transparent;
    border-radius: 4px;
    border: 1px solid rgb(var(--primary-700));
    color: rgb(var(--primary-700));
    padding: 3px 12px;
}
.block-list-item-container button:active {
    background-color: rgb(var(--gray-100));
}

/* D-Day 편지 프리뷰 (renderLetterArticlePreview) */
.dday-letter-preview-container {
    display: block;
    background-color: white;
    width: 100%;
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgb(var(--gray-100));
}
.dday-letter-content {
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* D-Day 시기별 토글 (renderToggleItem02) */
.dday-period-img {
    width: 24px;
    height: 24px;
    border-radius: 100%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dday-period-img img {
    width: 85%;
    height: 85%;
}

/* 임시저장 프리뷰 (renderDraftItem) */
.fragment-draft-preview-item {
    border-bottom: 1px solid rgb(var(--gray-100));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 52px;
}
.fragment-draft-preview-item .draft-title-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fragment-draft-preview-item .draft-title-box .draft-title {
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.fragment-draft-preview-item .delete-btn {
    cursor: pointer;
}

/* ── modal_fullscreen.css ── */
.modal-fullscreen {
    left: 50% !important;
    top: 50% !important;
    transform: translateX(-50%) translateY(-50%) !important;
    transition: none;
}

.modal-fullscreen > .modal-content {
    width: 100% !important;
    height: 100% !important;
}
/* ── style.css ── */
/************************* 검색어 하이라트 start *************************/
.highlight {
    background-color: rgb(var(--primary-100));
}
/************************* 검색어 하이라트 end *************************/

/************************* Toast start *************************/
.toast-container {
    position: absolute;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    font: var(--font-body2-r) !important;

    width: 100%;
    height: auto;
}
.toast-container .custom-toast {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    padding: 12px 16px;
    text-align: center;
    transition: opacity 0.5s ease;
    opacity: 0;
}
/************************* Toast end *************************/

/************************* header start *************************/
.mobile-status-bar {
    background-color: white;
    flex-shrink: 0;
}
.header {
    flex-shrink: 0;
}
/************************* header end *************************/

/************************* 공용 레이아웃 start *************************/
html, body {
    overflow: hidden;
    overflow: clip;     /* iOS 16+: hidden보다 강력한 스크롤 차단 */
}
body {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100svh;
}
.page-layout {
    background-color: rgb(var(--gray-50));
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
.page-layout .page-container {
    width: 100%;
    flex-grow: 1;
    min-height: 0;

    display: flex;
    flex-direction: column;

    position: relative;
}
.page-layout .page-container .page-main-scroll {
    position: relative;

    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: none;
}
.page-layout .page-container .page-main-scroll::-webkit-scrollbar {
    display: none;
}
/************************* 공용 레이아웃 end *************************/

/************************* 가로 스크롤 start *************************/
/* horizontal-scroll-wrapper의 너비를 고정해줘야 됨 */
.horizontal-scroll-wrapper {
    width: 100%;
    position: relative;
}

.horizontal-scroll-wrapper .horizontal-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    touch-action: pan-x;
}
.horizontal-scroll-wrapper .horizontal-scroll::-webkit-scrollbar {
    display: none;
}

/* 고정된 위치에 gradient 배치 */
.horizontal-scroll-wrapper::before,
.horizontal-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.horizontal-scroll-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgb(var(--gray-50)), transparent);
    opacity: 0;
}
.horizontal-scroll-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgb(var(--gray-50)), transparent);
    opacity: 0;
}

.horizontal-scroll-wrapper.horizontal-scroll-gray-100::before {
    background: linear-gradient(to right, rgb(var(--gray-100)), transparent);
}
.horizontal-scroll-wrapper.horizontal-scroll-gray-100::after {
    background: linear-gradient(to left, rgb(var(--gray-100)), transparent);
}

.horizontal-scroll-wrapper.fade-left::before { opacity: 1; }
.horizontal-scroll-wrapper.fade-right::after { opacity: 1; }
.horizontal-scroll-wrapper.fade-both::before,
.horizontal-scroll-wrapper.fade-both::after { opacity: 1; }
/************************* 가로 스크롤 end *************************/


/************************* 리스트 조회 결과 start *************************/
/* 로딩 중 (data-state 미설정): 빈 화면 깜빡임 방지 */
.search-result:not([data-state]) .search-result__initial,
.search-result:not([data-state]) .search-result__empty,
.search-result:not([data-state]) .search-result__list {
    display: none !important;
}
/* 상태: initial */
.search-result[data-state="initial"] .search-result__initial {
    display: flex;
}
.search-result[data-state="initial"] .search-result__empty,
.search-result[data-state="initial"] .search-result__list {
    display: none !important;
}
/* 상태: empty */
.search-result[data-state="empty"] .search-result__empty {
    display: flex;
}
.search-result[data-state="empty"] .search-result__initial,
.search-result[data-state="empty"] .search-result__list {
    display: none !important;
}
/* 상태: list */
.search-result[data-state="list"] .search-result__list {
    display: flex;
}
.search-result[data-state="list"] .search-result__initial,
.search-result[data-state="list"] .search-result__empty {
    display: none !important;
}

/* 디폴트 css */
.search-result {
    width: 100%;
    height: 100%;
}
.search-result .search-result__initial,
.search-result .search-result__empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: rgb(var(--gray-600));
    text-align: center;
}
.search-result .search-result__list {
    overflow-y: scroll;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.search-result .search-result__list::-webkit-scrollbar {
    display: none;
}
/* 결과가 2열 그리드로 나열되는 경우 */
.search-result .search-result__list.search-result__list--2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    height: fit-content !important;
}
 /************************* 리스트 조회 결과 end *************************/


/************************* 로딩 스피너 start *************************/
.loading-indicator {
    width: 150px;
    height: 150px;

    opacity: 0;
    transition: opacity 0.3s ease;

    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}
.loading-indicator.show {
    opacity: 1;
}
/************************* 로딩 스피너 end *************************/

/************************* 기타 start *************************/
.flex-fill {
    flex-grow: 1 !important;
    min-height: 0;
}

.hide-scrollbar {
    scrollbar-width: none; /* Firefox에서 스크롤바 숨김 */
}
.hide-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge에서 스크롤바 숨김 */
}
/************************* 기타 end *************************/
