/* 모든 팝업의 텍스트 색상 */
.widget-popup {
    color: #000000;
}

/* 입력창, 드롭다운 등은 검은색으로 변경하지 않음 */
.widget-popup input,
.widget-popup textarea,
.widget-popup select {
    color: #eeeeee;
}

/* '이웃당 불러올 글 수'와 '전체 게시물 글 수' 입력창 글자색만 검은색으로 변경 */
#posts_per_neighbor,
#total_posts {
    color: #000000;
    width: 50px;
}

/* 이웃 관리 테이블 헤더 텍스트 색상 */
#neighbor-manage-table thead th {
    color: #000000;
}

.rss-widget-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    
    width: 200px;
    height: 45px;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

.rss-widget-container.is-expanded {
    width: 200px;
    height: auto;
    min-height: 200px;
    max-height: 300px;
    border-radius: 30px;
}

.rss-widget-header {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 45px;
    cursor: pointer;
    border-radius: 30px;
    box-sizing: border-box;
}
.rss-widget-container.is-expanded .rss-widget-header {
    border-radius: 30px;
    cursor: default;
    height: 45px;
}
.rss-widget-container.is-expanded .rss-widget-header:hover {
    box-shadow: none;
}

.rss-widget-header .bell-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}
.rss-widget-header .material-icons {
    font-size: 1.2em;
}
.rss-widget-container.is-expanded .rss-widget-header .material-icons {
    /*color: #fff;*/
}

.rss-widget-header span {
    flex-grow: 1;
    font-size: 1em;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rss-widget-container.is-expanded .rss-widget-header span {
    /*color: #fff;*/
}

.rss-widget-header .badge {
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5px;
    box-sizing: border-box;
}
.rss-widget-container.is-expanded .rss-widget-header .badge {
    display: none;
}

.widget-header-buttons {
    display: none;
}
.rss-widget-container.is-expanded .rss-widget-header .widget-header-buttons {
    display: flex;
    gap: 2px;
    margin-left: auto;
}
.widget-header-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3em;
    height: 1.3em;
    padding: 0;
}
.widget-header-buttons button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.rss-widget-content {
    max-height: 0;
    overflow-y: hidden;
    padding: 0 15px;
    /*transition: all 0.5s ease-in-out;*/
}

.rss-widget-container.is-expanded .rss-widget-content {
    max-height: 220px;
    padding-top: 5px;
    opacity: 1;
}

/* 위젯 헤더 스타일 */
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

/* 확장된 위젯의 제목 스타일 */
.widget-header h2 {
    font-size: 1.2em;
    margin: 0;
}

.rss-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 115px;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.rss-list::-webkit-scrollbar {
    display: none;
}

.rss-list li {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 4px;
}

.rss-list a {
    text-decoration: none;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rss-list a:hover {
    text-decoration: underline;
}

.rss-list li .rss-category-icon {
    font-size: 1em;
    min-width: 1em;
    text-align: center;
}

.rss-list li .rss-category-icon .material-icons {
    font-size: 1em;
    vertical-align: middle;
}

.rss-list li .rss-nickname {
    white-space: nowrap;
}

/* RSS 목록 아이템 스타일 */
.rss-list-item {
    display: flex;
    align-items: center;
}

/* 닉네임 스타일 */
.rss-list-item .rss-nickname {
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 글 제목 스타일 */
.rss-list-item .rss-link {
    text-decoration: none;
    flex-grow: 1;
    min-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* N 뱃지 기본 스타일 (글 제목 뒤에 오는 경우) */
.rss-new-badge {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    font-size: 0.7em;
    font-weight: bold;
    border-radius: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* 글 제목이 없는 경우 N 뱃지 스타일 */
.rss-new-badge.no-post-title {
    margin-right: 25px;
    margin-left: 0;
}

/* 리스트 컨테이너 스타일 */
.rss-list-container {
    width: 100%;
    padding: 5px 10px 5px 10px;
    height: 125px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* 푸터 컨트롤 스타일 */
.widget-footer-controls {
    padding: 0 0 3px 0;
}

.widget-footer-controls button {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 1em;
    margin-top: 3px;
}

.widget-footer-controls select {
    padding: 4px;
    height: 23px;
    border-radius: 5px;
    font-size: 0.9em;
}

#category-filter-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* 설정 팝업 스타일 */
.widget-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
    width: 320px;
}

.widget-popup h3 {
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

/* 설정 팝업 가로 너비 조정 */
.settings-popup {
    width: 500px;
}

.settings-popup h3 .sub-text {
    font-size: 0.8em;
    font-weight: normal;
    color: #888;
    margin-left: 10px;
}

.other-settings-heading {
    margin-top: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.settings-grid-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.color-setting {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.color-setting label {
    font-weight: bold;
    font-size: 0.9em;
}

/* 색상 입력 그룹 스타일 */
.color-input-group {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

/* 색상 미리보기 스타일 */
.color-preview {
    width: 50px;
    height: 30px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* 리스트 배경 색상 입력 필드 스타일 */
.color-input-group .list-bg-color-input {
    width: 100px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.color-input-group input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 0;
    border: 1px solid #ddd;
}

.color-input-group .color-code-input {
    width: 100px;
    height: 30px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
}

/* 기타 설정 그리드 배치 */
.other-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

/* 위젯 제목, 아이콘 입력란 높이 조정 */
#widget_title_input,
#widget_icon_input {
    width: 120px;
    height: 20px;
    padding: 5px;
    box-sizing: border-box;
}

.widget-popup-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.widget-popup-buttons button {
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    width: 48%;
    box-sizing: border-box;
}

.btn-save {
    background-color: #333333;
    color: #fff;
    border: none;
}

.btn-close-popup {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

#settings-form label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
}

/* 이웃 관리 팝업 */
.manage-neighbors-popup {
    width: 600px;
    max-width: 90%;
}

.manage-neighbors-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.manage-neighbors-popup h3 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.manage-neighbors-popup .top-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
/* 헤더 제목 스타일 */
.manage-neighbors-popup h3 {
    margin: 0;
}

/* 상단 컨트롤 컨테이너 */
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* 카테고리 필터와 검색창을 묶는 컨테이너 */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 상단 카테고리 필터 높이 조절 */
#batch-category-select {
    height: 25px;
    line-height: 25px;
    font-size: 0.9em;
}

/* 닉네임 검색창 스타일 */
#neighbor-search {
    font-size: 0.9em;
    width: 120px;
    height: 25px;
    box-sizing: border-box;
}

/* 선택 수정/선택 삭제 버튼 공통 스타일 */
.btn-selective-update,
.btn-selective-delete {
    padding: 4px 12px;
    height: 25px;
    font-size: 0.9em;
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
}

/* '선택 수정' 버튼 스타일 */
.btn-selective-update {
    background-color: #eeeeee;
    color: #555;
}

/* '선택 삭제' 버튼 스타일 */
.btn-selective-delete {
    background-color: #333333;
    color: #fff;
}

.btn-selective-update:hover {
    background-color: #dddddd;
}

.btn-selective-delete:hover {
    background-color: #444444;
}

/* 테이블 레이아웃 */
#neighbor-manage-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}


#neighbor-manage-table thead th,
#neighbor-manage-table tbody td {
    padding: 8px;
    border: 1px solid #ccc;
    vertical-align: middle;
}


#neighbor-manage-table thead th {
    text-align: center;
}

#neighbor-manage-table thead th:nth-child(1),
#neighbor-manage-table tbody td:nth-child(1) {
    width: 5%;
    text-align: center;
}

/* 테이블 열의 너비 지정 */
#neighbor-manage-table thead th:nth-child(2),
#neighbor-manage-table tbody td:nth-child(2) {
    width: 15%; /* 카테고리 열 */
}
#neighbor-manage-table thead th:nth-child(3),
#neighbor-manage-table tbody td:nth-child(3) {
    width: 16%; /* 닉네임 열 */
}
#neighbor-manage-table thead th:nth-child(4),
#neighbor-manage-table tbody td:nth-child(4) {
    width: 40%; /* 링크 열 */
}
#neighbor-manage-table thead th:nth-child(5),
#neighbor-manage-table tbody td:nth-child(5) {
    width: 10%; /* 액션 열 */
}

.actions-cell {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

/* 관리 열 버튼 스타일 */
.actions-cell button {
    background: none;
    text-align: center;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.actions-cell button:hover {
    color: #F8CACC;
}

.actions-cell .material-icons {
    font-size: 1.4em;
    vertical-align: middle;
}

#neighbor-manage-table input[type="text"],
#neighbor-manage-table select {
    width: 100%;
    box-sizing: border-box;
}

.table-scroll-container {
    max-height: 300px;
    overflow-y: auto;
}

/* 이웃 추가 팝업 스타일 */
.add-neighbor-popup {
    width: 320px;
}

#add-neighbor-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

#add-neighbor-form .form-group label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
}

#add-neighbor-form .form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* 이웃 수정 팝업 스타일 */
.update-neighbor-popup {
    width: 320px;
}

#update-neighbor-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

#update-neighbor-form .form-group label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
}

#update-neighbor-form .form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* 페이지네이션 컨트롤 컨테이너 */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 5px;
}

/* 페이지 이동 버튼 (이전/다음) */
.page-nav-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    padding: 0 5px;
}
.page-nav-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* 페이지 번호 컨테이너 */
.page-numbers-container {
    display: flex;
    gap: 5px;
}

/* 페이지 번호 버튼 */
.page-number-btn {
    width: 25px;
    height: 25px;
    background-color: transparent;
    border: none;
    border-radius: 5px;
    color: #888;
    font-size: 0.9em;
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

/* 활성화된 페이지 버튼 */
.page-number-btn.is-active {
    background-color: #e0e0e0;
    color: #000;
    font-weight: bold;
    border-radius: 5px;
}

/* 호버 효과 */
.page-number-btn:hover {
    background-color: #f0f0f0;
}

/* 테마 불러오기 팝업 내부 컨테이너 스타일 */
#themes-list-container {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* 테마 아이템 전체 컨테이너 (레이아웃 조정) */
.theme-item {
    padding: 0;
    margin-bottom: 10px;
}

.theme-item-content {
    display: flex;
    align-items: center;
    padding: 8px;
    gap: 15px;
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0.02, 0.02, 0.02, 0.02);
}

/* '테마 불러오기' 팝업의 헤더 스타일 추가 */
.load-themes-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

/* 팝업 헤더 제목 스타일 */
.load-themes-popup h3 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 색상 박스를 감싸는 컨테이너 */
.theme-colors {
    display: flex;
    gap: 3px;
}

/* 개별 색상 박스 */
.color-box {
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* 테마 이름 스타일 */
.theme-name {
    flex-grow: 1;
    font-weight: bold;
    color: #333;
}

/* 버튼들을 감싸는 컨테이너 스타일 */
.theme-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 적용 버튼 스타일 */
.btn-apply-theme {
    padding: 4px 8px;
    background-color: #F8CACC;
    color: #222222;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    flex-shrink: 0;
}

.btn-apply-theme:hover {
    background-color: #f7c1c3;
}

/* 삭제 버튼 스타일 (아이콘용 정사각형 버튼) */
.btn-delete-theme {
    padding: 5px;
    background-color: #333333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    flex-shrink: 0;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-delete-theme:hover {
    background-color: #444444;
}

.btn-delete-theme .material-icons {
    font-size: 1.1em;
}

.widget-popup .popup-header .top-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* 내 RSS URL 공유 컨테이너 스타일 */
.share-rss-container {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* RSS URL 입력창 스타일 추가 */
#my_rss_url {
    flex-grow: 1;
    min-width: 120px;
    height: 25px;
    padding: 8px;
    box-sizing: border-box;
    font-size: 0.9em;
}

#settings-form .share-rss-container .switch {
    margin-bottom: 0;
}

/* 기타 설정 - 테마 관리 버튼 그룹 스타일 */
.other-settings-grid .buttons-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* 테마 관리 버튼 공통 스타일 */
.btn-save-theme,
.btn-load-theme {
    padding: 5px 12px;
    background-color: #F8CACC;
    color: #222222;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-save-theme:hover,
.btn-load-theme:hover {
    background-color: #f7c1c3;
}