@font-face {
    font-family: 'JeonGiAnjeon';
    src: url('../fonts/JeonGiAnjeon-Regular.ttf') format('truetype'); /* TTF 포맷 */
    font-weight: normal;
    font-style: normal;
}

/* 공통 스타일 */
body, html {
    min-width: 360px;
    margin: 0;
    padding: 0;
    height: 100vh; /* 뷰포트 높이에 맞춤 */
    width: 100vw; /* 뷰포트 너비에 맞춤 */
    overflow: hidden; /* 스크롤을 강제로 제거 */
    display: flex;
    flex-direction: column; /* 세로로 레이아웃 배치 */
    justify-content: center; /* 세로 중앙 정렬 */
    align-items: center;     /* 가로 중앙 정렬 */
    background-color: #f9f9f9;
}
*{
    font-family: 'scoreDream', sans-serif;
}

.page{
    list-style: none;
    /* padding: 0px 15px 0 15px; */
    margin: 0;
    flex: 1;
    overflow-y: auto;
}
#main-content{
    list-style: none;
    /* padding: 0px 15px 0 15px; */
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

/* 메인 컨테이너 */
#mainContainer {
    width: 100%;
    max-width: 100vw;         /* 최대 너비 */
    max-height: 100vh;        /* 최대 높이 */
    height: calc(100% - 60px);             /* 기본 높이 */
    background-color: white;  /* 배경 색 */
    /* border: 1px solid #ddd;    */
    /* border-radius: 10px;       */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  */
    display: flex;
    flex-direction: column;
    overflow: hidden;         /* 내용이 넘칠 경우 숨김 */
    position: relative;       /* 내부 요소와의 관계 설정 */
    padding-bottom: 60px;     /* footer와 겹치지 않도록 여백 추가 */
}


/* 헤더 스타일 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #007bff;
    color: white;
    font-size: 20px;
    height:30px;
}

.header-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
}

/* .header-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
} */


/* 헤더 제목 스타일 */
.header-title {
    display: flex;
    flex: 1;
    text-align: center;
    justify-content: center;
    align-items: center;
}

/* 헤더 제목 스타일 */
.header-title-room {
    flex: 3;
    text-align: center;
}

/* 이전 버튼 스타일 */
.back-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0px;
    display: flex;
    align-items: center;
}

.back-btn svg {
    fill: none;
    stroke: white;
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.back-btn:hover svg {
    stroke: #ccc; /* 호버 시 색상 변경 */
}

/* 검색 버튼 스타일 */
.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    /* padding: 5px; */
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: right;
    transition: background-color 0.3s ease;
}


.search-btn svg {
    width: 29px;
    height: 29px;
    fill: white; /* 돋보기 색상 */
}


/* 푸터 스타일 */
.footer {
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    border-top: 1px solid #ddd;
    height: 60px;
    position: absolute; /* 컨테이너 내부에서 고정 */
    bottom: 0; /* 컨테이너 하단에 위치 */
    width: 100%; /* 부모의 너비를 차지 */
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* 위쪽 그림자 */
}

.footer div {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    cursor: pointer;
}

.footer div.active {
    color: #007bff;
    font-weight: bold;
}

.footer div i {
    font-size: 23px;
    display: block;
    margin-bottom: 4px;
}


/* 공통 스타일 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}


/* 개별 채팅방 스타일 */
.chat-room {
    display: flex;
    align-items: center; /* 이미지와 텍스트 세로 정렬 */
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 17px 0px 17px 0px;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* 호버 효과 */
    cursor: pointer; /* 클릭 가능한 요소 표시 */
    border-radius: 0px;
    margin-bottom: 0px;
}

/* 호버 효과 */
/* .chat-room:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
} */

/* 대표 사진 스타일 */
.room-image {
    width: 110px;
    height: 110px;
    border-radius: 5px; /* 둥근 모서리 */
    margin-right: 15px; /* 텍스트와 간격 */
    object-fit: cover; /* 이미지 비율 유지 */
    border: 0px solid #ddd; /* 회색 테두리 */
}

.room-image-owner {
    width: 20px;
    height: 20px;
    border-radius: 50%; /* 둥근 모서리 */
    margin-right: 4px; /* 텍스트와 간격 */
    object-fit: cover; /* 이미지 비율 유지 */
    border: 0px solid #ddd; /* 회색 테두리 */
}

/* 채팅방 정보 스타일 */
.room-image {
    width: 110px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.room-info {
    flex-grow: 1; /* 오른쪽 영역이 남은 공간 차지 */
}

.room-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.room-description {
    display: block;
    margin: 8px 0;
    color: #666; /* 설명 텍스트 색상 */
    padding: 6px 0px;
}

.room-image-owner {
    width: 24px;
    height: 24px;
    border-radius: 50%; /* 이미지 둥글게 */
    margin-right: 8px; /* 텍스트와 간격 */
}



/* 본문 스타일 */
.chat-room-list {
    list-style: none;
    padding: 0px 15px 0 15px;
    margin: 0;
    flex: 1; /* 나머지 공간을 채움 */
    overflow-y: auto; /* 내용이 많을 경우 스크롤 */
}

.mychat-room-list {
    list-style: none;
    padding: 0px 15px 0 15px;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}


/* 채팅방 제목 스타일 */
.chat-room-title {
    text-align: center;
    font-size: 24px;
    margin: 20px 0;
    color: #333; /* 제목 색상 */
}

/* 채팅 메시지 영역 */
.chat-messages {
    box-sizing: border-box;
    /* border: 1px solid #ddd;
    border-radius: 5px; */
    background-color: #f0f8ff;
    padding: 0px 5px 10px 5px;
    /* max-height: calc(100vh - 54px - 60px - 93px);  */
    overflow-y: auto; /* 메시지가 많을 경우 스크롤 활성화 */
    /* margin-bottom: 10px; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  */
    height: 100%;
}

.notification {
    display: flex;
    justify-content: space-between;
    align-items: end;
    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;
}

.notification_time{
    font-size: 11px;
    /* color: #888; */
    margin-left: 7px;
}

/* 개별 메시지 스타일 */
.message {
    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd; /* 메시지 간 구분선 */
}

.message strong {
    color: #007bff; /* 사용자 이름 색상 */
}

.timestamp {
    float: right;
    font-size: 12px;
    color: #999;
}

/* 채팅 입력 영역 */
.chat-input {
    z-index: 1005;
    display: flex;
    gap: 10px;
    justify-content: space-around;
    background-color: #fff;
    /* border-top: 1px solid #ddd; */
    height: 60px;
    position: fixed;
    bottom: 0;
    width: 100%;
    /* box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); */
    padding:10px;
    align-items: center;
    box-sizing: border-box;
}

.chat-input input {
    flex: 1; /* 입력 필드가 버튼을 제외한 모든 공간 차지 */
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.chat-input button {
    padding: 14px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    width: 16%;
}

.chat-input button:hover {
    background-color: #0056b3; /* 버튼 호버 색상 */
}

/* 플로팅 버튼 스타일 */
.floating-button {
    position: fixed; /* 화면에서 고정 */
    bottom: 80px; /* 화면 하단에서 20px */
    right: 15px; /* 화면 오른쪽에서 20px */
    width: 142px; /* 버튼의 너비 */
    height: 45px; /* 버튼의 높이 */
    background-color: #007bff; /* 파란색 배경 */
    color: white; /* 텍스트 색상 */
    border-radius: 30px 30px 30px 30px; /* 완전히 둥근 모양 */
    display: flex;
    justify-content: center; /* 가로 중앙 정렬 */
    align-items: center; 
    font-size: 16px; /* `+` 기호 크기 */
    font-weight: 500; /* 기호 굵기 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 그림자 효과 */
    cursor: pointer; /* 클릭 가능 커서 */
    z-index: 1000; /* 다른 요소 위에 표시 */
    transition: background-color 0.2s ease, width 0.2s ease, height 0.2s ease; /* 호버 효과 및 크기 애니메이션 */
}


/* 버튼 호버 효과 */
.floating-button:hover {
    background-color: #0056b3; /* 더 진한 파란색 */
}

/* 스피너 컨테이너 중앙 정렬 */
#spinnerContainer {
    position: fixed;
    top: 54px;
    left: 0;
    width: 100%;
    height: calc(100vh - 114px);
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 스피너 스타일 */
.spinner {
    width: 50px;
    height: 50px;
    animation: rotateSpinner 1s linear infinite;
}

/* 스피너 경로 스타일 */
.spinner-path {
    stroke: #555;
    stroke-linecap: round;
    stroke-dasharray: 150, 200; /* 대시 배열 설정 */
    stroke-dashoffset: 0;
    animation: dashSpinner 1.5s ease-in-out infinite;
}

/* 전체 회전 애니메이션 */
@keyframes rotateSpinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 대시 효과 애니메이션 */
@keyframes dashSpinner {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 100, 200;
        stroke-dashoffset: -15;
    }
    100% {
        stroke-dasharray: 150, 200;
        stroke-dashoffset: -120;
    }
}

.custom-hr {
    border: 0;
    height: 1px;
    background: #ccc; /* 선의 색상 */
    margin: 10px 0 3px 0;
}


ol, ul {
    list-style: none;
}


/* 터치 하이라이트 효과 제거 */
ul, li {
    -webkit-tap-highlight-color: transparent; /* 터치 시 반응 제거 (모바일) */
    touch-action: manipulation; /* 터치 액션 제한 */
    user-select: none; /* 터치 및 드래그 시 텍스트 선택 방지 */
}

/* 포커스 및 활성화 스타일 제거 */
ul:focus, ul:active, li:focus, li:active {
    outline: none;
    background: none; /* 배경색 반응 제거 */
}


/* 전체 화면의 반투명 회색 배경 */
#progressOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 반투명 회색 배경 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* 최상위 레이어 */
}

/* 프로그레스 바 컨테이너 */
#progressContainer {
    width: 80%; /* 프로그레스 바의 가로 크기 */
    max-width: 400px; /* 최대 가로 크기 */
    background-color: #e9ecef; /* 바깥 배경색 */
    border-radius: 8px; /* 둥근 모서리 */
    overflow: hidden; /* 내용이 넘치지 않도록 설정 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 약간의 그림자 */
}

/* 프로그레스 바 */
#progressBar {
    height: 30px; /* 프로그레스 바 높이 */
    background-color: #007bff; /* 프로그레스 바 색상 */
    color: white; /* 텍스트 색상 */
    text-align: center; /* 텍스트 가운데 정렬 */
    line-height: 30px; /* 텍스트 세로 정렬 */
    width: 0%; /* 초기 상태 */
    transition: width 0.3s ease; /* 부드러운 애니메이션 */
}

 /* Splash 화면 스타일 */
 #splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* 배경 흰색 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 중앙 이미지 스타일 */
#splash .logo {
    width: 150px;
    height: 150px;
    background-image: url('../img/logo-05.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 10px;
    margin-top: -100px;
}

/* Notice 텍스트 스타일 */
#splash .notice {
    font-size: 18px;
    color: #ffffff; /* 텍스트 색상 */
    font-weight: bold;
    text-align: center;
    border: 1px solid #333;
    background-color: #333; /* 배경 흰색 */
    display: flex;
    padding: 10px 30px;
    border-radius: 20px 20px 20px 20px; /* 완전히 둥근 모양 */
}

.logo {
    margin:0 auto;
    width: 150px;
    height: 150px;
    background-image: url('../img/logo-05.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


/* 본인 메시지 컨테이너 (오른쪽 정렬) */
.my-message-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    align-items: end;
}

/* 본인 메시지 스타일 */
.my-message {
    background-color: #ffeb3b;
    padding: 5px 8px;
    border-radius: 10px;
    display: inline-block;
    max-width: 30ch;
    min-width: 1ch;
    word-break: break-word;
    line-height: 23px;
    overflow: hidden;
    font-size: 13px;
    /* text-align: center; */
}

/* 상대방 메시지 컨테이너 */
.other-message-container {
    display: flex;
    align-items: flex-start;
    margin-top: 12px;
}

.system-message-container{
    display: flex;
    align-items: flex-start;
}


/* 상대방 프로필 이미지 스타일 */
.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 2px;
    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: 5px 8px;
    border-radius: 10px;
    position: relative;
    max-width: 26ch;
    min-width: 5ch;
    word-break: break-word;
    margin-right: auto;
    overflow: hidden;
    font-size: 13px;
    line-height: 23px;
    display: block;
    margin-bottom: 5px;
}



.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: 13px;
    color: #000;
    margin-bottom: 3px;
    margin-left: 3px;
    display: flex;
    align-items: center; /* 수직 중앙 정렬 */
    gap: 5px; /* 아이콘과 텍스트 간 간격 */

}
.AddMessagesCnt{
    padding: 3px 10px;
    font-size: 13px;
    /* margin-top: 10px; */
    background-color: #87CEFA;
    color: #ffffff;
    border-radius: 15px 15px 15px 15px;
}
.notReadMessagesCnt{
    padding: 3px 10px;
    font-size: 13px;
    /* margin-top: 10px; */
    background-color: red;
    color: #ffffff;
    border-radius: 15px 15px 15px 15px;
}
/* 상대방 메시지 시간 표시 스타일 */
.message-time {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
    /* margin-left: 4px; */
}
/* 내 메시지 시간
 표시 스타일 */
.message-time-my {
    font-size: 11px;
    color: #888; /* 시간 텍스트 색상 */
    margin-top: 25px;
    margin-right: 4px;
    text-align: left; /* 왼쪽 정렬 */
    display: block;
}

.message-meta {
    display: flex;
    flex-direction: column; /* 세로로 배치 */
    align-items: flex-start;  /* 오른쪽 정렬 */
    margin-top: 0px;        /* 메시지와 간격 */
    margin-left:3px;
}

.message-read {
    font-size: 11px;
    color: #f5e341;
    margin-bottom: 0px;
    font-weight: bold;
}



/* 모달 스타일 */
.modal {
    display: none; /* 모달을 처음에 숨깁니다 */
    position: fixed;
    z-index: 1006;
    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: 0px;
    height:calc(100vh);
}

/* 모달 헤더 영역 */
.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);
    overflow: hidden; /* 모달 내용에 스크롤을 추가 */
    padding: 10px;
    height: calc(100vh);
}

/* 본문 텍스트 */
#modalMessage {
    margin: 0;
}


#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 포함한 크기 계산 */
    font-size: 14px;
    line-height: 24px;
}

.room-info h3 i {
    margin-right: 1px;
    color: #f44336; /* 자물쇠 색상 */
}
