@charset "utf-8";
@import url('https://cdn.rawgit.com/moonspam/NanumSquare/master/nanumsquare.css');

/* 구분선 색상 */
:root {
    --divider-color: rgba(255, 255, 255, 0.5);
}

/* 구분선 */
.gradient-divider {
    height: 1px;
    width: 50%;
    background: linear-gradient(
        to right,
        transparent,
        var(--divider-color) 20%,
        var(--divider-color) 80%,
        transparent
    );
    border: none;
}
  
.flexcenter {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 공통 스타일 */
.banner-board {
    margin: 0;
    font-family: 'nanumsquare';
}

.banners-padding {
    height: 20px;
}

.notice-banners, .normal-banners {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.banner-grid {
    display: grid;
    gap: 5px;
    margin-bottom: 20px;
    width: fit-content;
}

.banner-item {
    border-radius: 5px;
    transition: all 0.2s ease;
    max-height: 40px;
    max-width: 200px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner-wrap {
    position: relative;
    width: fit-content;
    max-height: 40px;
	max-width: 200px;
}

.banner-img {
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.banner-info {
}

.banner-title {
}

.banner-ctrl {
    font-size: 12px;
}

.banner-edit, .banner-del {
    display: inline-block;
    margin: 0 3px;
    color: #666;
}

/* 공지 배너 스타일 */
.banner-item.notice-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.banner-copy-msg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* 툴팁 스타일 */
.banner-tooltip {
    position: absolute;
    left: 50%;
    top: -35px;
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.banner-tooltip:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    margin-left: -5px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 10px solid var(--tooltip-arrow-color, #000000);
}

.banner-wrap:hover .banner-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 관리자 버튼 영역 */
.bo_fx {
    text-align: right;
}

.admin-buttons .btn {
    display: inline-block;
    padding: 4px 8px;
    background: #333;
    color: #eee;
    border-radius: 3px;
    font-size: 11px;
    text-decoration: none;
}

.admin-buttons .btn_admin {
    background: #510000;
}

/* 작성 폼 스타일 */
.bo_w_info, .bo_w_tit, .bo_w_link, .bo_w_order, .bo_w_banner, .bo_w_tooltip {
    margin: 15px 0;
}

.bo_w_info label, .bo_w_tit label, .bo_w_link label, .bo_w_order label, .bo_w_banner label, .bo_w_tooltip label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.frm_input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.frm_info {
    color: #888;
    font-size: 12px;
    margin-top: 5px;
}

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

.btn_submit {
    padding: 10px 20px;
    background: #4e73df;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn_cancel {
    display: inline-block;
    padding: 10px 20px;
    background: #f1f1f1;
    color: #333;
    border-radius: 3px;
    text-decoration: none;
    margin-left: 5px;
}

/* 배너 URL 입력 영역 */
.banner_input_wrap {
    margin-top: 10px;
}

.banner_upload, .banner_url {
    margin-bottom: 10px;
}

/* 툴팁 설정 영역 */
.tooltip_colors {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.tooltip_bg, .tooltip_text {
    flex: 1;
    min-width: 150px;
}

.tooltip_preview {
    width: 100%;
    margin-top: 15px;
}

.tooltip_preview span {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#tooltip_preview_box {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    background: #000;
    color: #fff;
    font-size: 13px;
    margin-top: 5px;
    position: relative;
}

#tooltip_preview_box:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 20px;
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #000 transparent transparent;
}

/* 반응형 처리 */
@media (max-width: 768px) {
    .pc-only {
        display: none;
    }
    
    .tooltip_colors {
        flex-direction: column;
    }
    
    .tooltip_bg, .tooltip_text {
        width: 100%;
    }
}

/* 배너 일괄 관리 */
.batch-manage {
    background-color: #1e1e1e;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'nanumsquare';
}

.batch-manage h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 500;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

.batch-manage .tbl_wrap {
    margin-bottom: 20px;
}

.batch-manage table {
    width: 100%;
    border-collapse: collapse;
    background-color: #252525;
    border: 1px solid #333;
}

.batch-manage th {
    background-color: #333;
    color: #fff;
    padding: 5px 8px;
    font-weight: 500;
    text-align: center;
    font-size: 10px;
}

.batch-manage td {
    padding: 5px 3px;
    border: 1px solid #333;
    vertical-align: middle;
    text-align: center;
}

/* 순서와 공지 칼럼 너비 설정 */
.batch-manage .th_order,
.batch-manage .td_order {
    width: 20px !important;
}

.batch-manage .th_notice,
.batch-manage .td_notice {
    width: 20px !important;
}
.batch-manage .th_action,
.batch-manage .td_action {
    width: 80px !important;
}

.batch-manage .th_color {
    width: 100px;
}

.batch-manage .th_img {
	max-width: 200px;
}

/* 순서 입력 필드 스타일 */
.batch-manage .td_order input[type="text"] {
    width: 40px;
    text-align: center;
    box-sizing: border-box;
}

/* 공지 체크박스 스타일 */
.batch-manage .td_notice {
    text-align: center;
}

.batch-manage .td_notice input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4a6bff;
}

/* 툴팁 색상 설정 */
.td_tooltip_color {
    text-align: left;
}

.tooltip-bg,
.tooltip-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tooltip-bg input[type="text"],
.tooltip-text input[type="text"] {
    width: 80px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 5px 8px;
}

.tooltip-bg input[type="color"],
.tooltip-text input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
}

/* 입력 필드 스타일 */
.batch-manage .frm_input {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 8px;
    border-radius: 4px;
    font-family: 'nanumsquare';
    font-size: 11px;
}

/* 체크박스 스타일 */
.batch-manage input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4a6bff;
}

/* 버튼 스타일 */
.batch-manage .btn_confirm {
    text-align: center;
    margin-top: 20px;
}

.batch-manage .btn_submit {
    background-color: #4a6bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.batch-manage .btn_submit:hover {
    background-color: #3a5bef;
}

.batch-manage .btn_cancel {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.batch-manage .btn_cancel:hover {
    background-color: #666;
}

.batch-manage .td_img {
    max-height: 40px;
    max-width: 200px;
    box-sizing: border-box;
}

/* 이미지 스타일 */
.batch-manage td img {
    height: auto;
	max-height: 40px;
    border-radius: 4px;
}

/* 빈 테이블 메시지 */
.batch-manage .empty_table {
    padding: 50px 0;
    color: #888;
}

/* 저장 버튼 스타일 */
.batch-manage .save-banner,
.batch-manage .delete-banner {
    border: none;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.batch-manage .save-banner {
    background-color: #bbb;
    color: #333;
}


.batch-manage .delete-banner {
    background-color: #510000;
    color: #eee;
}

/* 저장 성공 효과 */
.batch-manage tr.saved {
    background-color: rgba(74, 107, 255, 0.2);
    transition: background-color 0.5s;
}

.batch-manage .save-status.complete {
    background-color: #285c28;
}

.save-status.error {
    background-color: #510000;
}

/* 저장 상태 표시 */
.save-status {
    background-color: #333;
    color: #fff;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
}

/* 저장 중인 행 스타일 */
tr.saved {
    background-color: rgba(74, 107, 255, 0.2);
    transition: background-color 0.5s;
}

/* 버튼 비활성화 스타일 */
.btn_submit:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.pg_wrap .pg_current.pg_page {
    display: inline-flex;
    padding: 0;
    background: #333;
    color: #eee;
    border-radius: 3px;
    font-size: 11px;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    border: 0;
    height: 30px;
    width: 20px;
    line-height: 1;
    font-family: 'NanumSquare';
}

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


/* 반응형 조정 */
@media (max-width: 768px) {
    .batch-manage table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .admin-buttons {
        display: none;
    }
    .banner-grid {
        display: grid;
        gap: 3px;
        margin-bottom: 0;
    }
    .gradient-divider {
        width: 80%;
        margin: 10px 0;
    }
    .banner-board .pg_wrap {
        display: none;
    }
}