/* bylaw_public 전용 스타일 */

/* ===== 레이아웃 ===== */
.bylaw_public_body {
    all: unset;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: #f5f6fa;
}

.bylaw_pub_container {
    width: 100%;
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 56px; /* nav 높이만큼 여백 */
}

.bylaw_pub_main {
    position: relative;
    width: 800px;
    max-width: 100%;
    padding: 60px 0 120px 0;
    display: flex;
    flex-direction: column;
    gap: 70px;
    background-color: white;
    border-radius: 12px;
    padding: 60px 48px 120px 48px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

/* ===== 네비게이션 ===== */
.bylaw_pub_nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: white;
    border-bottom: 1px solid var(--outlineColor);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.bylaw_pub_nav_inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 20px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.bylaw_pub_nav_logo {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}
.bylaw_pub_nav_logo_img {
    height: 24px;
}
.bylaw_pub_nav_logo_text {
    font-weight: 700;
    font-size: 15px;
    color: var(--mainColor);
    letter-spacing: -0.3px;
}

.bylaw_pub_nav_actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bylaw_pub_nav_btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
    color: var(--mainColor);
    fill: var(--mainColor);
    user-select: none;
    white-space: nowrap;
}

.bylaw_pub_nav_btn:hover {
    background-color: #f0f4ff;
}

.bylaw_pub_nav_btn_cta {
    background-color: var(--subColor);
    color: white;
    fill: white;
}

.bylaw_pub_nav_btn_cta:hover {
    background-color: var(--mainColor);
}

/* 검색 활성 상태 */
.bylaw_pub_nav_btn_active {
    background-color: #e8eeff;
    color: var(--subColor);
    fill: var(--subColor);
}

/* ===== 본문 내 검색바 ===== */
.bylaw_pub_inpage_bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-top: 1px solid #e8e8e8;
    background: #fafafa;
}
.bylaw_pub_inpage_input_wrap { flex: 1; }
.bylaw_pub_inpage_input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    outline: none;
}
.bylaw_pub_inpage_input:focus { border-color: #3949ab; }
.bylaw_pub_inpage_counter {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    min-width: 44px;
    text-align: center;
}
.bylaw_pub_inpage_nav_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
    color: #555;
    flex-shrink: 0;
}
.bylaw_pub_inpage_nav_btn:hover { background: #eeeeee; color: #3949ab; }
.bylaw_pub_inpage_nav_btn svg { fill: currentColor; }

/* 하이라이트 */
mark.bylaw_pub_highlight {
    background: #fff176;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}
mark.bylaw_pub_highlight_cur {
    background: #ff9800;
    color: #fff;
}

/* ===== 검색 드롭다운 ===== */
.bylaw_pub_search_box {
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    background-color: white;
    border-bottom: 1px solid var(--outlineColor);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 12px 20px 16px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bylaw_pub_search_input_wrap {
    display: flex;
    align-items: center;
    flex: 1;
}

.bylaw_pub_search_input {
    all: unset;
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--subColor);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
}

.bylaw_pub_search_input:focus {
    outline: none;
    border-color: var(--mainColor);
}

.bylaw_pub_search_result {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
    max-width: 500px;
}

.bylaw_pub_search_placeholder {
    color: grey;
    font-size: 13px;
    padding: 6px 2px;
}

.bylaw_pub_search_item {
    padding: 8px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background-color 0.1s;
}

.bylaw_pub_search_item:hover {
    background-color: #f0f4ff;
}

.bylaw_pub_search_item_name {
    font-weight: 600;
    color: var(--mainColor);
}

.bylaw_pub_search_item_date {
    font-size: 12px;
    color: grey;
}

.bylaw_pub_search_loading {
    color: grey;
    font-size: 13px;
    padding: 6px 2px;
}

.bylaw_pub_search_empty {
    color: grey;
    font-size: 13px;
    padding: 6px 2px;
}

/* ===== 하단 CTA ===== */
.bylaw_pub_bottom_cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px 0 20px 0;
    border-top: 1px solid var(--outlineColor);
}

.bylaw_pub_bottom_cta_text {
    font-size: 15px;
    color: grey;
    text-align: center;
}

.bylaw_pub_bottom_cta_btn {
    background-color: var(--subColor);
    color: white;
    font-weight: 900;
    font-size: 15px;
    padding: 12px 28px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.bylaw_pub_bottom_cta_btn:hover {
    background-color: var(--mainColor);
}

/* ===== 유틸 ===== */
.bylaw_pub_hidden {
    display: none !important;
}

/* ===== 모바일 반응형 ===== */
@media (max-width: 680px) {
    .bylaw_pub_main {
        padding: 40px 20px 80px 20px;
    }
    .bylaw_pub_nav_btn span {
        display: none;
    }
    .bylaw_pub_nav_btn {
        padding: 6px 8px;
    }
}

/* ===== 담당자 확인 팝업 (하단 슬라이드업 토스트) ===== */
.bylaw_pub_manager_toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #fff;
    border: 1px solid #c5cae9;
    border-radius: 14px;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.08),
        0 8px 24px rgba(57,73,171,0.15),
        0 20px 48px rgba(57,73,171,0.12);
    padding: 18px 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 900;
    width: 300px;
    animation: bylaw_pub_slideup 0.35s cubic-bezier(.22,.68,0,1.2);
}
@keyframes bylaw_pub_slideup {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 괴롭힘 팝업은 담당자 팝업 위에 표시 */
#bylaw_pub_harassment_toast {
    bottom: 172px;
}

@media (max-width: 680px) {
    .bylaw_pub_manager_toast {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        min-width: 280px;
        max-width: 90vw;
        animation: bylaw_pub_slideup_mobile 0.35s cubic-bezier(.22,.68,0,1.2);
    }
    @keyframes bylaw_pub_slideup_mobile {
        from { opacity: 0; transform: translateX(-50%) translateY(24px); }
        to   { opacity: 1; transform: translateX(-50%) translateY(0); }
    }
    #bylaw_pub_harassment_toast {
        bottom: 172px;
    }
}
.bylaw_pub_manager_toast_icon_row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.bylaw_pub_manager_toast_icon {
    font-size: 20px;
    line-height: 1.4;
    flex-shrink: 0;
}
.bylaw_pub_manager_toast_msg {
    font-size: 14px;
    color: #222;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}
.bylaw_pub_manager_toast_btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.bylaw_pub_manager_toast_btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
}
.bylaw_pub_manager_toast_btn_yes {
    background: #3949ab;
    color: #fff;
    box-shadow: 0 2px 8px rgba(57,73,171,0.25);
}
.bylaw_pub_manager_toast_btn_yes:hover { background: #283593; }
.bylaw_pub_manager_toast_btn_no {
    background: #f0f0f0;
    color: #888;
}
.bylaw_pub_manager_toast_btn_no:hover { background: #e4e4e4; }

/* ===== 담당자 정보 입력 모달 ===== */
.bylaw_pub_manager_modal_backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.bylaw_pub_manager_modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 28px 24px;
    width: 440px;
    max-width: 92vw;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.bylaw_pub_manager_modal_title {
    font-size: 17px;
    font-weight: 700;
    color: #1a237e;
    margin: 0;
}
/* 혜택 목록 */
.bylaw_pub_manager_modal_benefit {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f3f4fb;
    border-radius: 10px;
    padding: 14px 16px;
}
.bylaw_pub_manager_modal_benefit_item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}
.bylaw_pub_manager_modal_benefit_icon { font-size: 15px; flex-shrink: 0; }
/* 주의사항 */
.bylaw_pub_manager_modal_notice {
    font-size: 11.5px;
    color: #999;
    margin: -6px 0 0;
    line-height: 1.5;
}
.bylaw_pub_manager_modal_form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bylaw_pub_manager_modal_label {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    font-weight: 500;
}
.bylaw_pub_manager_modal_required { color: #e53935; }
.bylaw_pub_manager_modal_input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
}
.bylaw_pub_manager_modal_input:focus { border-color: #3949ab; }
/* 개인정보 동의 */
.bylaw_pub_manager_modal_privacy_wrap {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}
.bylaw_pub_manager_modal_privacy_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fafafa;
}
.bylaw_pub_manager_modal_privacy_check_row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #444;
    font-weight: 500;
}
.bylaw_pub_manager_modal_privacy_chk { cursor: pointer; }
.bylaw_pub_manager_modal_privacy_toggle {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}
.bylaw_pub_manager_modal_privacy_toggle:hover { color: #3949ab; }
.bylaw_pub_manager_modal_privacy_toggle svg { transition: transform 0.2s; fill: currentColor; }
/* 개인정보 상세 테이블 */
.bylaw_pub_manager_modal_privacy_detail {
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
}
.bylaw_pub_privacy_table_row {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    line-height: 1.6;
}
.bylaw_pub_privacy_table_row_last { border-bottom: none; }
.bylaw_pub_privacy_table_th {
    flex-shrink: 0;
    width: 72px;
    padding: 9px 10px;
    background: #f5f5f5;
    color: #555;
    font-weight: 600;
}
.bylaw_pub_privacy_table_td {
    padding: 9px 12px;
    color: #444;
    flex: 1;
}

/* honeypot 숨김 */
.bylaw_pub_mgr_hp_wrap {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}
.bylaw_pub_manager_modal_footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.bylaw_pub_manager_modal_btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
}
.bylaw_pub_manager_modal_btn_cancel {
    background: #f0f0f0;
    color: #666;
}
.bylaw_pub_manager_modal_btn_cancel:hover { background: #e0e0e0; }
.bylaw_pub_manager_modal_btn_submit {
    background: #3949ab;
    color: #fff;
    box-shadow: 0 2px 8px rgba(57,73,171,0.25);
}
.bylaw_pub_manager_modal_btn_submit:hover { background: #283593; }
