@charset "utf-8";
@import url('shared_within_color.css');

/* 폰트 설정 */
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
    font-weight: normal;
    font-style: normal;
}


.within_toggle_btn {
    position: fixed;
    top: 0;
    right: 5%;
    z-index: 1000;
}

.within_toggle_btn button {
    position: relative;
    /* 배지의 기준 */
}

.within-toggle-new-badge {
    position: absolute;
    top: 5px;
    right: 2px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    font-size: 0.5em;
    line-height: 1;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.within_toggle_btn button {
    display: flex;
    padding-bottom: 10px;
    width: 25px;
    height: 40px;
    background: var(--within-toggle-bg);
    color: var(--within-toggle-text);
    border: none;
    border-radius: 0px 0px 6px 6px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    justify-content: center;
    align-items: flex-end;
}

.within_toggle_btn button:hover {
    background: var(--within-item-hover);
    transform: translateY(-2px);
}

/* 모달 스타일 */
.within_modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    backdrop-filter: blur(3px);
}

.within_modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1002;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--within-title-text);
}

.within_modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--within-border-color, #ddd);
    background: var(--within-title-bg, #f8f9fa);
    font-family: 'Pretendard';
    line-height: 1.3;
}

.within_modal_header h2 {
    margin: 0;
    font-size: 1.5em;
    color: var(--within-title-text, #333);
}

.within_close_btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--within-title-text, #333);
}

.within_modal .within_footer {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid var(--within-border-color, #ddd);
    background: var(--within-title-bg, #f8f9fa);
    font-family: 'Pretendard';
}

.within_modal .within_footer .within_footer_buttons {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.within_modal .within_footer .within_footer_buttons .admin_api_btn_wrap,
.within_modal .within_footer .within_footer_buttons #showWithinConfigBtn,
.within_modal .within_footer .within_footer_buttons #showWithinViewBtn {
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-family: 'Pretendard';
    padding: 3px 8px;
    color: var(--within-title-text);
    font-size: 12px;
    transition: all 0.2s;
}

.within_modal .within_footer .within_footer_buttons .admin_api_btn_wrap:hover,
.within_modal .within_footer .within_footer_buttons #showWithinConfigBtn:hover,
.within_modal .within_footer .within_footer_buttons #showWithinViewBtn:hover {
    background: var(--within-item-hover);
}


.within_modal_content {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.within_modal_content .shared_within_wrapper {
    margin: 0;
    max-width: none;
    box-shadow: none;
    border-radius: 0;
    height: 100%;
    font-family: 'Pretendard';
}

/* 동맹 시스템 스타일 - 범위 제한 */
.shared_within_wrapper .shared_within_container {
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.shared_within_wrapper {
    margin: 0 auto;
    padding: 20px;
    background: var(--within-window-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--within-shadow-color);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.shared_within_wrapper .page_title {
    font-size: 2em;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--within-accent-color);
    padding-bottom: 10px;
    color: var(--within-title-text);
}

.shared_within_wrapper .shared_within_container {
    border-radius: 8px;
}


.shared_within_wrapper .within_header h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--within-title-text);
}

.shared_within_wrapper .within_desc {
    color: var(--within-title-info-text);
}

.shared_within_wrapper .within_loading {
    text-align: center;
    padding: 30px 0;
}

.shared_within_wrapper .within_spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--within-accent-color);
    animation: withinspin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes withinspin {
    to {
        transform: rotate(360deg);
    }
}

.shared_within_wrapper .within_tbl_feed {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px var(--within-shadow-color);
}

.shared_within_wrapper .within_tbl_feed th,
.shared_within_wrapper .within_tbl_feed td {
    padding: 10px;
    text-align: center;
    font-size: 12px;
    position: relative;
}

/* 행 구분선 */
.shared_within_wrapper .within_tbl_feed tr:not(:last-child) td,
.shared_within_wrapper .within_tbl_feed tr:not(:last-child) th {
    border-bottom: none;
    position: relative;
}

.shared_within_wrapper .within_tbl_feed tr:not(:last-child) td::before,
.shared_within_wrapper .within_tbl_feed tr:not(:last-child) th::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
            rgba(from var(--within-border-color) r g b / 0%),
            rgba(from var(--within-border-color) r g b / 80%) 10%,
            rgba(from var(--within-border-color) r g b / 80%) 90%,
            rgba(from var(--within-border-color) r g b / 0%));
}

/* 테이블 헤더 특별 스타일 */
.shared_within_wrapper .within_tbl_feed th {
    font-weight: bold;
    text-align: center;
    color: var(--within-title-text);
    background: var(--within-title-bg);
    font-size: 14px;
    border-bottom: none;
    position: relative;
}

.shared_within_wrapper .within_tbl_feed th::after {
    background: linear-gradient(to bottom,
            rgba(from var(--within-window-border) r g b / 0%),
            rgba(from var(--within-window-border) r g b / 90%), 20%,
            rgba(from var(--within-window-border) r g b / 90%), 80%,
            rgba(from var(--within-window-border) r g b / 0%), 0);
}

.shared_within_wrapper .within_tbl_feed thead tr:last-child th::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right,
            rgba(from var(--within-border-color) r g b / 0%),
            rgba(from var(--within-border-color) r g b / 40%), 10%,
            rgba(from var(--within-border-color) r g b / 40%), 90%,
            rgba(from var(--within-border-color) r g b / 0%));
}

.shared_within_wrapper .within_tbl_feed tr:hover {
    background-color: var(--within-table-row-hover);
}

.shared_within_wrapper .within_tbl_feed .td_subject {
    text-align: left;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    font-size: 13px;
}

.shared_within_wrapper .within_tbl_feed .td_datetime {
    width: 80px;
    text-align: center;
    font-size: 0.9em;
}

.shared_within_wrapper .within_pagination {
    text-align: center;
    margin-top: 20px;
}

.shared_within_wrapper .within_pagination ul {
    display: inline-block;
    padding: 0;
    margin: 0;
}

.shared_within_wrapper .within_pagination li {
    display: inline;
    margin: 0 2px;
}

.shared_within_wrapper .within_pagination li a,
.shared_within_wrapper .within_pagination li .within_pg_current {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid var(--within-border-color);
    color: var(--within-text-color);
    text-decoration: none;
    border-radius: 4px;
    background: var(--within-content-bg);
    transition: all 0.2s;
}

.shared_within_wrapper .within_pagination li.active a {
    background-color: var(--within-accent-color);
    color: #fff;
    border-color: var(--within-accent-color);
}

.shared_within_wrapper .btn_config,
.shared_within_wrapper .btn_admin_api {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--within-button-primary-bg);
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px var(--within-shadow-color);
}

.shared_within_wrapper .btn_config:hover,
.shared_within_wrapper .btn_admin_api:hover {
    background-color: var(--within-button-primary-hover);
    color: #fff;
    transform: translateY(-2px);
}

.shared_within_wrapper .empty_config {
    text-align: center;
    padding: 50px 0;
    background: var(--within-content-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--within-shadow-color);
}

.shared_within_wrapper .empty_config p {
    margin-bottom: 20px;
    color: var(--within-title-info-text);
}

.shared_within_wrapper .empty_table {
    text-align: center;
    padding: 30px 0;
    color: var(--within-title-info-text);
}

/* 설정 페이지 스타일 */
/* .shared_within_wrapper .shared_within_config {
    margin: 20px 0;
    background: var(--within-content-bg);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px var(--within-shadow-color);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
} */

.shared_within_wrapper .config_info {
    background: var(--within-window-bg);
    padding: 15px;
    border: 1px solid var(--within-window-border);
    margin-bottom: 20px;
    border-radius: 6px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-family: 'Pretendard';
    font-size: 12px;
}

.shared_within_wrapper .tbl_config {
    width: 100%;
    border-collapse: collapse;
    background: var(--within-window-bg);
    border-radius: 6px;
    overflow: hidden;
    font-size: 12px;
}

.shared_within_wrapper .tbl_config th,
.shared_within_wrapper .tbl_config td {
    padding: 10px;
}

.shared_within_wrapper .tbl_config th {
    background-color: var(--within-title-bg);
    font-weight: bold;
    text-align: center;
    color: var(--within-title-text);
}

.shared_within_wrapper .tbl_frm {
    width: 100%;
    border-collapse: collapse;
    background: var(--within-window-bg);
    border-radius: 6px;
    overflow: hidden;
}

.shared_within_wrapper .tbl_frm th,
.shared_within_wrapper .tbl_frm td {
    padding: 10px;
    border: 1px solid var(--within-table-border);
}

.shared_within_wrapper .tbl_frm th {
    width: 120px;
    background: var(--within-title-bg);
    color: var(--within-title-text);
}

.shared_within_wrapper .frm_input {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid var(--within-border-color);
    border-radius: 4px;
    transition: all 0.2s;
    background: var(--within-title-bg);
    color: var(--within-title-text);
}

.shared_within_wrapper .frm_input:focus {
    border-color: var(--within-accent-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
    outline: none;
}

.shared_within_wrapper .frm_info {
    display: block;
    margin-top: 5px;
    color: var(--within-title-info-text);
    font-size: 0.9em;
}

.shared_within_wrapper .btn_submit {
    padding: 6px 11px;
    background-color: var(--within-button-primary-bg);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px var(--within-shadow-color);
    font-size: 12px;
    font-family: 'Pretendard';
}

.shared_within_wrapper .btn_submit:hover {
    background-color: var(--within-button-primary-hover);
    transform: translateY(-2px);
}

.shared_within_wrapper .btn_cancel {
    padding: 8px 15px;
    background-color: var(--within-button-secondary-bg);
    color: var(--within-text-color);
    border: 1px solid var(--within-border-color);
    border-radius: 6px;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.2s;
}

.shared_within_wrapper .btn_cancel:hover {
    background-color: var(--within-button-secondary-hover);
}

.shared_within_wrapper .btn_edit,
.shared_within_wrapper .btn_delete_single {
    padding: 5px 10px;
    background-color: var(--within-button-secondary-bg);
    color: var(--within-text-color);
    border: 1px solid var(--within-border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.shared_within_wrapper .btn_edit:hover,
.shared_within_wrapper .btn_delete_single:hover {
    background-color: var(--within-button-secondary-hover);
}

.shared_within_wrapper .existing_config h3,
.shared_within_wrapper .add_config h3,
.shared_within_wrapper .global_settings h3 {
    margin-bottom: 5px;
    font-size: 1.2em;
    color: var(--within-title-text);
}

.shared_within_wrapper .btn_list {
    margin-top: 10px;
    text-align: right;
}

.shared_within_wrapper .btn_confirm {
    margin-top: 10px;
    text-align: center;
}

.shared_within_wrapper .admin_api_btn_wrap {
    display: inline-block;
}

/* 위젯 스타일 */
.within_widget {
    margin-bottom: 20px;
    border: 1px solid var(--within-window-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--within-content-bg);
    box-shadow: 0 2px 8px var(--within-shadow-color);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.within_widget h3 {
    background: var(--within-title-bg);
    margin: 0;
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid var(--within-border-color);
    color: var(--within-title-text);
}

.within_widget .within_latest {
    list-style: none;
    margin: 0;
    padding: 0;
}

.within_widget .within_latest li {
    border-bottom: 1px solid var(--within-border-color);
    padding: 0;
}

.within_widget .within_latest li:last-child {
    border-bottom: none;
}

.within_widget .within_link {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: var(--within-text-color);
    transition: background-color 0.2s;
}

.within_widget .within_link:hover {
    background-color: var(--within-item-hover);
}

.within_widget .within_site {
    color: var(--within-accent-color);
    font-size: 0.9em;
    margin-right: 5px;
}

.within_widget .within_subject {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.within_widget .within_date {
    display: block;
    font-size: 0.85em;
    color: var(--within-title-info-text);
    margin-top: 3px;
}

.within_widget .within_more {
    text-align: right;
    padding: 8px 10px;
    border-top: 1px solid var(--within-border-color);
    background: var(--within-window-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.within_widget .within_more a {
    font-size: 0.9em;
    color: var(--within-accent-color);
    text-decoration: none;
}

.within_widget.empty {
    padding: 15px;
    text-align: center;
    color: var(--within-title-info-text);
}

.within_widget .within_latest .empty {
    padding: 15px;
    text-align: center;
    color: var(--within-title-info-text);
}

.shared_within_wrapper .btn_add {
    padding: 5px 10px;
    background-color: var(--within-button-secondary-bg);
    color: var(--within-text-color);
    border: 1px solid var(--within-border-color);
    border-radius: 4px;
    cursor: pointer;
}

.shared_within_wrapper .selected-boards ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shared_within_wrapper .selected-boards li {
    display: inline-block;
    margin: 3px;
    padding: 5px 8px;
    background: var(--within-window-bg);
    border: 1px solid var(--within-border-color);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.shared_within_wrapper .remove-board {
    background: none;
    border: none;
    color: var(--within-title-info-text);
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-left: 5px;
    padding: 0 3px;
}

.shared_within_wrapper .remove-board:hover {
    color: var(--within-button-red);
}

/* 피드 옵션 스타일 */
.shared_within_wrapper .within_feed_options {
    margin-bottom: 8px;
    padding: 6px 10px;
    background: var(--within-window-bg);
    border: 1px solid var(--within-window-border);
    border-radius: 8px;
    /* backdrop-filter: blur(5px); */
    /* -webkit-backdrop-filter: blur(5px); */
}

.shared_within_wrapper .within-feed-options-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shared_within_wrapper .within-option-group {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.shared_within_wrapper .within-option-group label {
    margin-right: 8px;
    font-weight: bold;
    color: var(--within-title-text);
}

.shared_within_wrapper .within-option-group select {
    padding: 5px;
    border: 1px solid var(--within-border-color);
    border-radius: 4px;
    background: var(--within-title-bg);
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    color: var(--within-title-text);
}

.shared_within_wrapper .within_btn_refresh {
    padding: 5px 10px;
    background-color: var(--within-accent-color);
    color: var(--within-toggle-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-family: 'Pretendard';
}

.shared_within_wrapper .within_btn_refresh:hover {
    background-color: var(--within-button-primary-hover);
}

.shared_within_wrapper .page-info {
    margin-top: 10px;
    text-align: center;
    color: var(--within-title-info-text);
    font-size: 0.9em;
}

/* 글로벌 설정 스타일 */
.shared_within_wrapper .global_settings {
    margin-top: 10px;
    border-radius: 8px;
}

/* 테이블 열 너비 조정 */
.shared_within_wrapper .within_tbl_feed th:nth-child(1),
.shared_within_wrapper .within_tbl_feed td:nth-child(1) {
    /* 이름(사이트명) */
    max-width: 80px;
    width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared_within_wrapper .within_tbl_feed th:nth-child(2),
.shared_within_wrapper .within_tbl_feed td:nth-child(2) {
    /* 게시판 */
    max-width: 100px;
    width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared_within_wrapper .within_tbl_feed th:nth-child(4),
.shared_within_wrapper .within_tbl_feed td:nth-child(4) {
    /* 작성자 */
    max-width: 60px;
    width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared_within_wrapper .within_tbl_feed th:nth-child(5),
.shared_within_wrapper .within_tbl_feed td:nth-child(5) {
    /* 작성일 */
    max-width: 120px;
    width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared_within_wrapper .within_tbl_feed th:nth-child(3),
.shared_within_wrapper .within_tbl_feed td:nth-child(3) {
    /* 제목 */
    width: auto;
    text-align: left;
}


.within_modal .shared_within_config .within_chk {
    text-align: center;
}

.within_modal .shared_within_config .within_name {
    max-width: 60px;
    width: 60px;
    text-align: center;
}

.within_modal .shared_within_config .within_api {}

.within_modal .shared_within_config .within_site {}

.within_modal .shared_within_config .within_load {
    max-width: 40px;
    width: 40px;
    text-align: center;
}

.within_modal .shared_within_config td.within_date {
    font-size: 10px;
    color: var(--within-title-info-text);
}

.within_modal .shared_within_config th.within_date {
    max-width: 60px;
    width: 60px;
}

.within_modal .shared_within_config th.within_adm {
    max-width: 100px;
    width: 100px;
}

.within_modal .shared_within_config td.within_adm {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-family: 'Pretendard';
}

.within_modal .shared_within_config .tbl_config th {
    background: var(--within-title-bg);
}

.within_modal a:link {
    color: var(--within-accent-color);
}

.within_modal .within_tbl_feed,
.within_modal .tbl_config,
.within_modal .tbl_frm {
    color: var(--within-title-text);
}

.within-alliance-item-con {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
    gap: 5px;
    margin-bottom: 10px;
}

.within-alliance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: var(--within-title-bg);
    transition: all 0.2s;
    width: calc(90% / 3);
}

.within-alliance-item:hover {
    background-color: var(--within-item-hover);
}

.within-alliance-info {
    flex: 1;
}

.within-alliance-actions {
    margin-left: 10px;
}

.within-new-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 5px;
    background-color: var(--within-button-red);
    color: var(--within-toggle-text);
    font-size: 11px;
    border-radius: 3px;
    font-weight: bold;
}

.within-btn-mark-read {
    padding: 3px 8px;
    background-color: var(--within-button-secondary-bg);
    border: 1px solid var(--within-border-color);
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Pretendard';
}

.within-btn-mark-read:hover {
    background-color: #e9e9e9;
}

.within-read-complete {
    opacity: 0.5;
    cursor: not-allowed;
}

.within-option-btn {
    display: flex;
    gap: 15px;
}

.within-alliance-btn {
    border: 0;
    background: transparent;
    font-family: 'Pretendard';
    font-size: 12px;
    color: var(--within-accent-color);
    transition: all 0.2s;
}

.within_feed_options .within-option-btn .within_btn_toggle {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    font-family: 'Pretendard';
    font-size: 13px;
    color: var(--within-title-text);
    background: transparent;
    border: 0;
    gap: 3px;
}

::-webkit-scrollbar {
    display: none;
}