/* =========================================
   권한
   ========================================= */

/* =========================================
   서브 콘텐츠 알림 박스
   ========================================= */
#subcontBtn {
    background-color: #f8fafd;
}

.jw-sub-cont {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    background: #ffffff00;
    border: 1.5px solid #e4eaf5;
    border-radius: 12px;
    justify-content: space-between;
    align-items: center;
}

.jw-sub-cont .jw-sub-left {
    display: flex;
    align-items: center;
    gap: 3px;
}

.jw-sub-cont p {
    font-size: 13.5px;
    color: #444;
    line-height: 1.75;
}

.jw-sub-cont a {
    font-size: 12.5px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid #e4eaf5;
    background: #ffffff00;
    transition: all 0.2s;
    white-space: nowrap;
}

.jw-sub-cont a:hover,
.jw-sub-cont a.active {
    background: #1255a4;
    border-color: #1255a4;
    color: #fff;
}

.jw-close-btn {
    /* width: 40px; */
    padding: 0 20px;
    height: 40px;
    border: 1px solid #dde3ef;
    border-radius: 10px;
    color: #c8cfe0;
}

.jw-close-btn:hover,
.jw-close-btn.active {
    background: #1255a4;
    border-color: #1255a4;
    color: #fff;
}

/* =========================================
   서브 콘텐츠 작성 팝업창
   ========================================= */
.jw-popup-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.jw-popup-box {
    background: #fff;
    width: 700px;
    max-width: 90%;
    border-radius: 12px;
    padding: 20px;
}

.jw-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.jw-popup-title {
    font-size: 20px;
}

.jw-preview-btn {
    height: 30px;
    padding: 0 30px;
    border: 1px solid #cdcdcd;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    color: #0057b8;
    cursor: pointer;
}

.jw-popup-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.jw-popup-input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #c8cfe0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    background: #f3f3f3;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    cursor: default;
}

.jw-popup-textarea {
    display: block;
    width: 100%;
    height: 250px;
    padding: 10px;
    border: 1px solid #c8cfe0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    resize: none;
    overflow-y: auto;
    transition: border-color 0.2s;
}

.jw-code-container {
    width: 100%;
}

.jw-editor-wrapper {
    width: 100%;
    height: 600px;
    display: flex;
}

.jw-editor-wrapper code {
    width: 100%;
    padding: 13px;
    border: 1px solid #c8cfe0;
    border-radius: 4px;
    background-color: #fff;
    font-size: 13.5px;
    font-family: 'Noto Sans KR';
}

.jw-editor-wrapper code:focus {
    outline: none;
    box-shadow: none;
}

.hljs {
    background: transparent !important;
}

.jw-editor-wrapper::-webkit-scrollbar {
    width: 5px;
}

.jw-editor-wrapper::-webkit-scrollbar-thumb {
    background: #efefef;
    border-radius: 4px;
}

.jw-popup-footer {
    margin-top: 15px;
    text-align: center;
}

.jw-popup-footer.first-box {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dddddd;
}

.jw-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 40px;
    margin-left: 5px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s, color 0.2s;
}

.jw-save {
    background: #0057b8;
    color: #fff;
}

.jw-close {
    background: #fff;
    color: #555;
    border: 1px solid #cdcdcd;
}

/* 미리보기 안내 */
.preview-notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    width: 600px;
    font-size: 12px;
    z-index: 9999;
}

.jw-popup-body.jw-category-old {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.jw-popup-body.jw-category-new {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.jw-popup-body table {
    width: 100%;
    border-collapse: collapse;
}

.jw-popup-body th {
    padding: 8px;
    text-align: center;
}

.jw-popup-body td {
    border-top: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.jw-popup-body th {
    background-color: #f5f5f5;
}

.jw-popup-body input[type="text"],
.jw-popup-body input[type="number"] {
    border: 1px solid #ddd;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    height: 40px;
}

.jw-popup-body select {
    padding: 5px;
    border: 1px solid #ddd;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    height: 40px;
}

.jw-board-setting {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.jw-board-setting table {
    min-width: 800px;
    white-space: nowrap;
}

.jw-board-setting span {
    padding: 0 20px;
}

.jw-board-setting input[type="text"],
.jw-board-setting input[type="number"] {
    width: 120px;
}

.jw-board-setting select {
    width: 120px;
}

/* =========================================
   AJAX 로딩 오버레이 + 스피너 추가
   ========================================= */
#jwLoading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

.jw-loading-box {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top: 5px solid transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: jwSpin 1s linear infinite;
}

@keyframes jwSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* =========================================
   ERROR
   ========================================= */
.jw-error-box {
    text-align: center;
}

.jw-error-body {
    align-items: center;
}

.jw-error-title {
    font-size: 32px;
    font-weight: 700;
    color: #0057b8;
    margin: 30px 0 0 0;
}

.jw-error-text {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}


/* =========================================
   BUTTON
   ========================================= */
[onclick*="udpate"] {
    font-size: 0;
}

[onclick*="udpate"]::after {
    content: "수정";
    font-size: 14px;
}

[onclick*="delete"] {
    font-size: 0;
}

[onclick*="delete"]::after {
    content: "삭제";
    font-size: 14px;
}