@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

* {
    font-family: "Pretendard Variable", system-ui;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    width: 100%;
    background-color: white;

    display: flex;
    flex-direction: column;
    padding: 0px 20px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: white; /* 로딩 화면 배경색 */
    z-index: 1000; /* 로딩 화면이 최상단에 보이도록 */
    font-size: 24px;
    color: #333;
}

.header {
    text-align: left;
    padding: 20px;
    background-color: #4a90e2;
}

.header h1 {
    font-size: 20px;
    color: white;
}

.response-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: white; /* 배경색을 흰색으로 변경 */
    overflow: hidden;
}

.response-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 100px; /* input-section 높이만큼 추가 */
}


.message-bubble {
    display: inline-block;
    padding: 16px;
    border-radius: 10px;
    margin: 0px 0px 12px 0px;
    word-wrap: break-word;
    max-width: 88%;
}

.message-bubble:first-child {
    margin-top: 40px;
}

.left-bubble {
    font-size: 14px;
    line-height: 1.4;
    background-color: #f0f0f0; /* 시스템 메시지 회색 배경 */
    color: #333; /* 시스템 메시지 글자 색 */
    align-self: flex-start;
}

.gray-bubble {
    background-color: #f0f0f0; /* 회색 배경 */
    color: black; /* 검정 글자 */
}

.right-bubble {
    background-color: #007BFF; /* 사용자 메시지 파란 배경 */
    color: white; /* 사용자 메시지 흰색 글자 */
    align-self: flex-end;
}

.input-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    width: 100%;
    padding: 12px 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    box-shadow: 0px -4px 12px 0px rgba(0, 0, 0, 0.04);
    z-index: 10; /* 다른 요소 위로 나타나도록 설정 */
}

.input-bar {
    width: calc(100% - 36px);
    display: flex;
    align-items: center;
    background-color: #f9f9f9; /* 배경색을 흰색으로 변경 */
    border-radius: 50px;
    border: 1px solid #eee;

    padding: 8px 8px 8px 16px;
    /* margin-left: 12px; */
}

#plusBtn {
    transition: .3s;
    transform: rotate(0deg);
}

.icon-button {
    width: 24px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.response-input {
    flex: 1;
    border: none;
    font-size: 14px;
    outline: none;
    background-color: #f9f9f9;
    color: #333;
    resize: none;

    margin-right: 16px;
}

.response-input::placeholder {
    color:#888;
    font-size: 14px;
}

/* 
.response-input:focus {
    height: auto;
} */

#action-buttons {
    margin-top: 12px;
    width: 100%;
    display: none; /* 기본적으로 숨김 */
    opacity: 0;
    max-height: 0;
    overflow: hidden; /* 높이 제한으로 넘치는 내용을 숨김 */
    transition: all 0.4s;
}

/* #action-buttons h3 {
    margin-bottom: 4px;
    font-size: 16px;
    width: 100%;
    color:#333;
} */

#action-buttons.show {
    margin-top: 24px;
    width: 100%;
    display: flex;
    opacity: 1;
    max-height: 500px; /* 충분히 큰 값을 설정하여 슬라이드 업될 수 있도록 함 */
}

.voice-recognition-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.message-box {
    width: 80%;
    margin: 0px auto 48px auto;
    padding: 8px 8px 8px 16px;
    background-color:#f9f9f9; /* Light gray background for consistency */
    border-radius: 40px; /* Rounded corners */
    border: 1px solid #eee; /* Border for better separation */
}

/* .button-container {
    width: 20%;
} */

#recordButton {
    margin: 24px auto 20px auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: hsl(3, 100%, 65%); /* Red button indicating record action */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);

    position: relative;
}

#recordButton img {
    width: 28px;
    height: 28px;
    margin-top: 4px;
}


#recordButton:before {
    content: '';
    position: absolute;
    width: 124%;
    height: 124%;
    border:1px solid #eee;
    border-radius: 50px;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);

}

.dots {
    flex-grow: 1;
    text-align: left;
    color: #666;
    font-size: 18px;
    letter-spacing: 2px;
    overflow: hidden;
    white-space: nowrap;
}

.timer {
    color: #333;
    font-weight: 400;
    font-size: 14px;
}


#recordButton.recording {
    background-color: #8e8e93; /* Grey color to indicate recording */
    border-radius: 8px;
    animation: pulse 1.5s infinite; /* Pulsing effect while recording */
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.voice-status {
    text-align: center;
    font-size: 16px;
    color: black; /* 텍스트 색상 설정 */
    margin-top: 10px; /* 상단 여백 추가 */
}
.divider {
    border: none;
    height: 1px;
    background-color: #ddd;
    margin: 10px 0;
}

.voice-status {
    text-align: center;
    font-size: 16px;
    color: black; /* 텍스트 색상 설정 */
    margin-top: 10px; /* 상단 여백 추가 */
}

.replay-button {
    background-color: white;
    color: #4a90e2;
    border: 1px solid #4a90e2;
    padding:8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px; /* 크기를 줄이기 위해 글자 크기 조정 */
    text-align: center;
    display: block; /* 블록으로 설정하여 정렬 가능 */
}