 /* 기본 배경 스타일 */
 body, html {
    background-color: #fff;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    font-size:14px;
}
main {
    background-color: #fff;
}

/* 채팅창 스타일 */
#chatbox {
    width: 100%;
    height: 580px;
    background-color: #f0f8ff;
    border: 0px solid #ccc;
    overflow-y: scroll;
    padding: 10px;
    box-sizing: border-box;
    z-index: 10;
}

.notification {
    display: inline-block;
    padding: 8px 15px 9px 15px;
    background-color: #acbecb; /* 카카오톡 알림 배경색 */
    color: #ffffff; /* 흰색 글씨 */
    font-size: 13px;
    border-radius: 30px;
    /* box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); */
    text-align: center;
    margin: 10px auto;
    border : 0px !important;
}

/* 메시지 공통 스타일 */
#chatbox p {
    line-height: 25px;
    padding: 8px 12px;
    border-radius: 10px;
    word-break: break-word;
    display: block;
    margin-bottom: 5px;
}

/* 본인 메시지 컨테이너 (오른쪽 정렬) */
.my-message-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    align-items:end;
}

/* 본인 메시지 스타일 */
.my-message {
    background-color: #ffeb3b;
    padding: 8px 12px;
    border-radius: 10px;
    display: inline-block;
    max-width: 33ch;
    min-width: 5ch;
    word-break: break-word;
    line-height: 23px;
    overflow: hidden;
}

/* 상대방 메시지 컨테이너 */
.other-message-container {
    display: flex;
    align-items: flex-start;
    margin-top: 15px;
}

.system-message-container{
    display: flex;
    align-items: flex-start;
}


/* 상대방 프로필 이미지 스타일 */
.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 5px;
    background-color: #d8d8d8;
    display: inline-block;
    flex-shrink: 0;
    background-image: url('https://kosuni.com/img/no_profile.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
}

/* 상대방 메시지 스타일 (왼쪽) */
.other-message {
    background-color: #ffffff;
    padding: 8px 12px;
    border-radius: 10px;
    position: relative;
    max-width: 33ch;
    min-width: 5ch;
    word-break: break-word;
    margin-right: auto;
    overflow: hidden;
    
    line-height: 23px;
    display: block;
    margin-bottom: 5px;
}

/* 상대방 메시지 상자 왼쪽 위 삼각형 */
.other-message::before {
    content: "";
    position: absolute;
    top: 0; /* 상자의 위쪽에 위치 */
    left: -10px; /* 상자의 왼쪽 바깥에 위치 */
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid #ffffff; /* 삼각형 색상 설정 */
    border-top: 10px solid #ffffff; /* 삼각형 색상 설정 */
    border-bottom: 10px solid transparent;
    z-index: 1; /* 상자 위에 표시되도록 설정 */
}

.other-message img {
    max-width: 100%; /* 컨테이너의 너비를 넘지 않도록 설정 */
    height: auto; /* 이미지의 비율을 유지하면서 크기를 조정 */
    border-radius: 5px; /* 이미지에 약간의 모서리 둥글기 추가 */
    cursor: pointer;
}

/* 전체보기/접기 버튼 스타일 */
.show-more {
    color: #666 !important;
    cursor: pointer;
    font-size: 11px;
    display: inline-block;
    margin-top: 5px;
    text-align: left;
    margin-bottom: 0px !important;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 0px;
}

/* 상대방 이름 표시 스타일 */
.message-user {
    font-size: 15px;
    color: #000;
    margin-bottom: 3px;
    margin-left: 1px;
    display: flex;
    align-items: center; /* 수직 중앙 정렬 */
    gap: 5px; /* 아이콘과 텍스트 간 간격 */

}

/* 상대방 메시지 시간 표시 스타일 */
.message-time {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    margin-left: 8px;
}
/* 내 메시지 시간
 표시 스타일 */
.message-time-my {
    font-size: 12px;
    color: #888; /* 시간 텍스트 색상 */
    margin-top: 25px;
    margin-right: 8px;
    text-align: left; /* 왼쪽 정렬 */
    display: block;
}

/* 공지사항 */
.notice-div {
    position: fixed;
    top: 109px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1023px;
    background-color: #fff;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 98;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notice-content {
    width: 100%;
}

.notice-header {
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    float:right
}

.notice-header .close-notice-btn {
    font-size: 14px;
    color: #ff5f5f; /* 닫기 버튼 색상 */
    cursor: pointer;
    margin-left: 15px;
}

.toggle-notice-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.notice-body {
    height: 20px; /* 초기 높이 */
    overflow: hidden; /* 내용이 넘칠 경우 숨기기 */
    transition: height 0.3s ease;
    font-size: 16px;
    line-height: 1.4;
    text-align: left;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;

}

.notice-btn {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    display: none; /* 처음엔 숨김 */
}

.notice-btn button {
    padding: 8px 12px;
    border: none;
    background-color: #d2d2d2;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    width: 47%;
}

.notice-btn button:hover {
    background-color: #ccc;
}

/* 모달 스타일 */
.modal {
    display: none; /* 모달을 처음에 숨깁니다 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 배경 반투명 */
    align-items: center;
    justify-content: center;
}


.modal-content {
    position: relative;
    background-color: #fff;
    width: 100%;
    max-width: 1020px;
    border-radius: 5px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* 모달 전체에 스크롤이 생기지 않도록 설정 */
    margin-top: 81px;
    height:calc(100vh - 180px);
}

/* 모달 헤더 영역 */
.modal-header {
    position: sticky;
    top: 0;
    /* background-color: #f1f1f1; */
    padding: 10px;
    /* border-bottom: 1px solid #ddd; */
    display: flex;
    align-items: center;
    
}

/* 뒤로가기 버튼 스타일 */
.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #000;
    margin-left: 10px;
}

/* 모달 본문 영역 */
.modal-body {
    max-height: calc(100vh - 240px);
    overflow: hidden; /* 모달 내용에 스크롤을 추가 */
    padding: 20px;
    height: calc(100vh - 160px);
}

/* 본문 텍스트 */
#modalMessage {
    margin: 0;
}


/* 모달 본문 영역 */
.modal-body {
    padding: 20px;
}

.rb_member{
    height: calc(100vh - 190px) !important;
}
.loginBtn{
   
}
#modalMessage{
    font-size: 14px;
    line-height: 24px;
}

textarea {
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    padding: 16px 6px 1px 12px !important;
    width: 100%;
    resize: none;
    box-shadow: none !important;
    box-sizing: border-box;
    line-height: 14px;
    z-index: 10;
}

#modalMessage {
    width: 100%;
    height: 100%; /* 부모 요소의 전체 높이 차지 */
    resize: none; /* 사용자가 크기를 조절할 수 없도록 */
    border: 0px solid !important;
    outline: none !important;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    padding: 20px; /* 텍스트에 여백 추가 */
    box-sizing: border-box; /* padding 포함한 크기 계산 */
}

/* 전체 화면을 덮는 배경 */
#profile {
    display: none; /* 처음에는 숨겨 둠 */
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 배경 투명도 */
    z-index: 1000; /* 화면 가장 위에 표시 */
    overflow: hidden;
    justify-content: center; /* 가운데 정렬 */
    align-items: flex-end; /* 아래쪽에서 시작 */
    overflow: hidden;
}

/* 프로필 설정 창 */
.profile-content {
    position: relative;
    background-color: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 5px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* 모달 전체에 스크롤이 생기지 않도록 설정 */
    top:20%;
    height:  500px;
    animation: slideUp 0.3s ease-out; /* 슬라이드 애니메이션 */
}
#sendBtn{
    z-index: 10;
}
/* 헤더 스타일 */
.profile-header {
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #ddd;
    position: relative;
}

/* 닫기 버튼 스타일 */
.profile-close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #333;
}

/* 프로필 본문 스타일 */
.profile-body {
    padding: 20px;
}

.profile-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-body ul li {
    padding: 15px 10px;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 0px solid #eee;
    text-align: center;
}

#userName {
    width: 80%;
    font-size: 20px;
    border: 0;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    text-align: center;
    outline: none; /* 포커스 시 아웃라인 제거 */
    box-shadow: none; /* 포커스 시 그림자 제거 */
    appearance: none; /* 브라우저 기본 스타일 무시 */
    -webkit-appearance: none; /* 웹킷 브라우저 기본 스타일 무시 */
    -webkit-tap-highlight-color: transparent; /* 모바일에서 클릭 시 하이라이트 제거 */
}

#userName:focus {
    outline: none; /* 포커스 시 아웃라인 제거 */
    border-color: #ccc; /* 포커스 시 동일한 테두리 유지 */
    box-shadow: none; /* 포커스 시 그림자 제거 */
    border-bottom: 1px solid #ccc; /* 포커스 시 동일한 테두리 유지 */
}

#userPic{
    border: 0px solid #ccc;
    width: 100px;
    height: 100px;
    /* background-color: #243456; */
    border-radius: 50%;
    object-fit: cover; /* 이미지가 컨테이너에 맞게 조정 */
}

.image-container {
    position: relative;
    display: inline-block;
    width: 100px; /* 이미지 크기에 맞게 조정 */
    height: 100px;
}

.change-icon {
    position: absolute;
    bottom: 0px;
    right: 0px;
    background-color: rgba(0, 0, 0, 0.6); /* 반투명 배경 */
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 애니메이션: 아래에서 위로 슬라이드 */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

#scrollDownButton {
    position: fixed;
    bottom: 80px;
    right: 12px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 30px;
    cursor: pointer;
    display: none; /* 기본적으로 숨김 */
    text-align: center;
}

/* 기본적으로 광고 숨기기 */
.sidebar-ads {
    display: none;
    /* border:1px solid #ccc; */
    
}

/* PC 화면에서 광고 표시 */
@media screen and (min-width: 1024px) {
    .sidebar-ads {
        display: block;
        position: fixed;
        bottom: 130px; /* 광고가 화면 상단에서 떨어진 거리 */
        left: 0; /* 화면 왼쪽에 고정 */
        width: 450px; /* 광고 폭 (적절히 조정 가능) */
        z-index: 1000;
    }
}

/* 기본적으로 광고 숨기기 */
.sidebar-user {
    display: none;
    /* border:1px solid #ccc; */
    
}

/* PC 화면에서 광고 표시 */
@media screen and (min-width: 1024px) {
    .sidebar-user {
        display: block;
        position: fixed;
        top: 110px; /* 광고가 화면 상단에서 떨어진 거리 */
        left: 1482px; /* 화면 왼쪽에 고정 */
        width: 270px; /* 광고 폭 (적절히 조정 가능) */
        background-color: #f0f8ff;
        border: 0px solid #ccc;
        /* overflow-y: scroll; */
        padding: 10px;
        box-sizing: border-box;
        border-radius: 20px;
    }
}

.loading{
    display: none; position: fixed; bottom: 200px; left: 50%; transform: translate(-50%, -50%);
}

.user-icon {
    display: flex;
    align-items: center; /* 아이콘 내의 텍스트 정렬 */
    justify-content: center;
}