/* Q&A 스타일 적용페이지 product_detail, user_store */
.qna-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}
.qna-input-area {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.qna-input-avatar {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}
.qna-input-form-wrapper {
    flex-grow: 1;
}
.qna-textarea {
    width: 100%;
    border: none;
    border-bottom: 0.0625rem solid #ccc;
    padding: 0.5rem 0;
    resize: none;
    overflow: hidden;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}
.qna-textarea:focus {
    outline: none;
    border-color: #065fd4;
    box-shadow: none;
}
.qna-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.qna-cancel-btn,
.qna-submit-btn {
    padding: 0.5rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.qna-cancel-btn {
    background-color: #f2f2f2;
    color: #0f0f0f;
    border: none;
}
.qna-cancel-btn:hover {
    background-color: #e5e5e5;
}
.qna-submit-btn {
    background-color: #065fd4;
    color: #fff;
    border: none;
}
.qna-submit-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
.qna-item {
    margin-bottom: 1.5rem; /* 24px -> 1.5rem */
    padding-bottom: 1.5rem; /* 24px -> 1.5rem */
    border-bottom: 0.0625rem solid #eee; /* 1px -> 0.0625rem */
    position: relative; /* 추가: 자식 요소의 절대 위치 지정을 위해 */
}
.qna-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.qna-question,
.qna-answer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}
.qna-type {
    font-weight: 600;
    color: #065fd4;
    font-size: 0.875rem;
    margin-bottom: 0.2rem;
}
.qna-answer .qna-type {
    color: #28a745;
}
.qna-text {
    font-size: 0.9375rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    margin-right: 1.7rem;
}
.qna-date {
    font-size: 0.75rem; /* 12px -> 0.75rem */
    color: #606060;
    margin-right: 2rem; /* 2rem으로 수정 */
    /* text-align: right; */ /* Flexbox로 변경되면서 필요 없어짐 */
    /* display: block; */ /* Flexbox로 변경되면서 필요 없어짐 */
}

.qna-options-dropdown {
    position: absolute;
    top: 0.5rem;
    right: 0;
}
.qna-options-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}
.qna-options-btn img {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.6;
}
.qna-options-btn:hover img {
    opacity: 1;
}
.qna-dropdown-menu {
    min-width: 5rem;
    text-align: center;
}
.qna-dropdown-menu .dropdown-item {
    text-align: center;
    font-size: 0.8rem;
}
.load-more-qna {
    margin-top: 1rem;
}
/* Dark Mode for Q&A Section */
[data-bs-theme="dark"] .qna-section {
    border-color: #333;
}
[data-bs-theme="dark"] .qna-input-area {
    color: #e1e1e1;
}
[data-bs-theme="dark"] .qna-textarea {
    background-color: transparent;
    border-color: #555;
    color: #e1e1e1;
}
[data-bs-theme="dark"] .qna-textarea:focus {
    border-color: #3ea6ff;
}
[data-bs-theme="dark"] .qna-cancel-btn {
    background-color: #333;
    color: #e1e1e1;
}
[data-bs-theme="dark"] .qna-cancel-btn:hover {
    background-color: #444;
}
[data-bs-theme="dark"] .qna-submit-btn {
    background-color: #054aab;
}
[data-bs-theme="dark"] .qna-submit-btn:disabled {
    background-color: #555;
}
[data-bs-theme="dark"] .qna-input-avatar {
    filter: invert(1);
}

[data-bs-theme="dark"] .qna-type {
    color: #3ea6ff;
}
[data-bs-theme="dark"] .qna-answer .qna-type {
    color: #28d745;
}
[data-bs-theme="dark"] .qna-text {
    color: #e1e1e1;
}
[data-bs-theme="dark"] .qna-date {
    color: #aaa;
}
[data-bs-theme="dark"] .qna-options-btn img {
    filter: invert(1);
}

/* 가로스크롤 버튼 적용페이지 index, user_store */
.scroll-wrapper {
    position: relative;
    margin: 0 -0.75rem; /* 컨테이너 패딩 보정 */
    padding: 0 0.75rem;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border: 0.0625rem solid #ddd;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.scroll-btn.hidden {
    opacity: 0;
    visibility: hidden;
}

.scroll-btn:hover {
    background-color: #fff;
    color: inherit;
    border-color: #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.scroll-btn-left {
    left: 0rem; /* 위치 조정 */
}

.scroll-btn-right {
    right: 0rem; /* 위치 조정 */
}

.scroll-btn img {
    filter: none;
    width: 1.5rem;
    height: 1.5rem;
}

.scroll-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.scroll-btn[disabled] img {
  opacity: 0.3;
  filter: grayscale(1) brightness(1.8);
}

[data-bs-theme="dark"] .scroll-btn {
    background-color: rgba(34, 34, 34, 0.9); /* #222 */
    border-color: #444;
}

[data-bs-theme="dark"] .scroll-btn:hover {
    background-color: #222;
}

[data-bs-theme="dark"] .scroll-btn img {
    filter: invert(1);
}

[data-bs-theme="dark"] .scroll-btn[disabled] img {
    opacity: 0.3;
    filter: grayscale(1) brightness(1.8) invert(1);
}

/* 채널 네비게이션 탭 적용페이지: storage, tags, user_store */
.tab-content {
    padding: 1rem 0;
}
.channel-nav {
    background-color: #fff;
    border-bottom: 0.1rem solid var(--border-color);
}

.channel-nav.sticky {
    position: fixed;
    top: 3.75rem; /* Navbar height */
    width: 100%;
    z-index: 1000;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

.channel-nav .nav-tabs {
    border-bottom: 0.0625rem solid #eee; /* 1px -> 0.0625rem */
    margin-bottom: 0; /* 탭 아래 여백 제거 */
}

.channel-nav .nav-tabs .nav-item {
    margin-bottom: -0.0625rem; /* 탭 하단 테두리와 겹치지 않도록 조정 */
}

.channel-nav .nav-tabs .nav-link {
    border: none;
    border-bottom: 0.1875rem solid transparent; /* 3px -> 0.1875rem */
    border-radius: 0; /* 모서리 둥글게 하지 않음 */
    background-color: transparent;
    color: #606060; /* 유튜브와 유사한 회색 */
    font-weight: 500;
    padding: 0.75rem 1rem; /* 12px 16px -> 0.75rem 1rem */
    font-size: 0.9375rem; /* 15px -> 0.9375rem */
    margin-right: 0.5rem; /* 탭 간 간격 */
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.channel-nav .nav-tabs .nav-link:hover,
.channel-nav .nav-tabs .nav-link:focus {
    border-color: #ccc; /* 호버 시 연한 회색 밑줄 */
    color: #0f0f0f;
    background-color: transparent;
}

.channel-nav .nav-tabs .nav-link.active {
    color: #0f0f0f; /* 활성화된 탭 글자색 */
    border-color: var(--youtube-red); /* 활성화된 탭 밑줄 색상 (유튜브 파란색) */
    background-color: transparent;
}

/* Dark Mode for Channel Nav */
[data-bs-theme="dark"] .channel-nav {
    background-color: #121212;
    border-color: #333;
}

[data-bs-theme="dark"] .channel-nav.sticky {
    box-shadow: 0 0.125rem 0.25rem rgba(255,255,255,0.075);
}

[data-bs-theme="dark"] .channel-nav .nav-tabs {
    border-color: #333;
}

[data-bs-theme="dark"] .channel-nav .nav-tabs .nav-link {
    color: #aaa;
}

[data-bs-theme="dark"] .channel-nav .nav-tabs .nav-link:hover,
[data-bs-theme="dark"] .channel-nav .nav-tabs .nav-link:focus {
    border-color: #555;
    color: #e1e1e1;
}

[data-bs-theme="dark"] .channel-nav .nav-tabs .nav-link.active {
    color: #e1e1e1;
    border-color: var(--youtube-red); /* 다크 모드 활성화 탭 밑줄 색상 */
}

/* 카테고리 칩 적용페이지: index, tags */
.category-chip {
    background-color: #f0f0f0; /* 더 연한 배경색 */
    border-radius: 0.5rem; /* 더 네모스럽게 변경 */
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: #000; /* 검정 글씨색 */
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.category-chip:hover {
    background-color: #d0d0d0;
}

.category-chip.active {
    background-color: #333 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .category-chip {
    background-color: #373737;
    color: #fff;
}

[data-bs-theme="dark"] .category-chip:hover {
    background-color: #4f4f4f;
}

[data-bs-theme="dark"] .category-chip.active {
    background-color: #fff !important;
    color: #121212 !important;
}

/* 고객센터 모달 스타일 */
.modal-header {
    border-bottom: 0.0625rem solid #eee;
}

.modal-title {
    font-weight: 600;
}

.modal-body .nav-tabs .nav-link {
    border: none;
    border-bottom: 0.1875rem solid transparent;
    border-radius: 0;
    background-color: transparent;
    color: #606060;
    font-weight: 500;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    margin-right: 0.5rem;
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.modal-body .nav-tabs .nav-link:hover,
.modal-body .nav-tabs .nav-link:focus {
    border-color: #ccc;
    color: #0f0f0f;
    background-color: transparent;
}

.modal-body .nav-tabs .nav-link.active {
    color: #0f0f0f;
    border-color: #065fd4;
    background-color: transparent;
}

.modal-body .accordion-button {
    font-weight: 500;
    color: #0f0f0f;
}

.modal-body .accordion-button:not(.collapsed) {
    color: #065fd4;
    background-color: #e7f1ff;
    box-shadow: inset 0 -0.0625rem 0 rgba(0, 0, 0, .125);
}

.modal-body .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.modal-body .accordion-body {
    font-size: 0.9375rem;
    color: #606060;
}

/* Dark Mode for Customer Service Modal */
[data-bs-theme="dark"] .modal-content {
    background-color: #222;
    color: #e1e1e1;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #333;
}

[data-bs-theme="dark"] .modal-title {
    color: #e1e1e1;
}

[data-bs-theme="dark"] .modal-body .nav-tabs .nav-link {
    color: #aaa;
}

[data-bs-theme="dark"] .modal-body .nav-tabs .nav-link:hover,
[data-bs-theme="dark"] .modal-body .nav-tabs .nav-link:focus {
    border-color: #555;
    color: #e1e1e1;
}

[data-bs-theme="dark"] .modal-body .nav-tabs .nav-link.active {
    color: #e1e1e1;
    border-color: #3ea6ff;
}

[data-bs-theme="dark"] .modal-body .accordion-button {
    color: #e1e1e1;
    background-color: #2c2c2c;
}

[data-bs-theme="dark"] .modal-body .accordion-button:not(.collapsed) {
    color: #3ea6ff;
    background-color: #333;
}

[data-bs-theme="dark"] .modal-body .accordion-body {
    color: #aaa;
}

[data-bs-theme="dark"] .modal-body .btn-close {
    filter: invert(1);
}

/* 고객센터 모달 우측 상단 고정 */
.modal-dialog-top-right {
    position: absolute;
    top: 3.75rem; /* 상단바 높이 */
    right: 1rem; /* 우측 여백 */
    margin: 0;
    transform: translate(0, 0) !important; /* 중앙 정렬 오버라이드 */
}

@media (max-width: 767.98px) {
    .modal-dialog-top-right {
        top: 3.75rem; /* 모바일에서도 상단바 아래에 위치 */
        right: 0.5rem; /* 우측 여백 조정 */
        left: auto; /* 좌측 정렬 해제 */
        bottom: auto; /* 하단 정렬 해제 */
        width: auto; /* 너비 자동 조정 */
        max-width: calc(100% - 1rem); /* 화면 너비에 맞게 최대 너비 설정 (좌우 여백 고려) */
        margin: 0;
        transform: translate(0, 0) !important;
    }
}

/* 고객센터 모달 고정 너비 */
.customer-service-modal-dialog {
    max-width: 31.25rem; /* 데스크톱에서 고정 너비 */
}

@media (max-width: 767.98px) {
    .customer-service-modal-dialog {
        max-width: calc(100% - 1rem); /* 모바일에서는 화면 너비에 맞게 */
    }
}
