/* 실시간 문의 채팅 CSS */

:root {
    --primary-color: #4285f4;
    --secondary-color: #f8f9fa;
    --accent-color: #4cc9f0;
    --light-bg: #f8f9fa;
    --dark-color: #333;
    --gray-color: #6c757d;
    --success-color: #4ade80;
    --warning-color: #fb8500;
    --danger-color: #ef4444;
    --border-color: #eee;
    --border-radius: 12px;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.chat-inquiry-page {
    margin: 0 auto;
}

.chat-container {
    background: white;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.chat-header h1 {
    font-size: 18px;
    font-weight: 700;
    flex-grow: 1;
    text-align: center;
}

.back-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--dark-color);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    background: #f9f9f9ba;
}

.message {
    max-width: 80%;
    margin-bottom: 16px;
    border-radius: 18px;
    padding: 12px 16px;
    line-height: 1.4;
    position: relative;
    animation: message-pop 0.3s ease;
}

@keyframes message-pop {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.message.bot {
    background-color: #f1f0f0;
    color: #333;
    align-self: flex-start;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message.user {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.typing-indicator {
    display: flex;
    padding: 12px 16px;
    background-color: #f1f0f0;
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 16px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #888;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.3s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

.message-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.option-button {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.option-button:hover,
.option-button:active {
    background-color: var(--primary-color);
    color: white;
}

.option-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-form-container {
    width: 100%;
    margin-bottom: 20px;
}

.form-message {
    margin-top: 15px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 10px;
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.input-actions {
    display: flex;
    justify-content: flex-end;
}


/* 위치 선택 스타일 */

.location-select-container {
    width: 100%;
    margin-bottom: 15px;
}

.location-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.location-dropdown {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background-color: #fff;
    outline: none;
}

.location-dropdown:focus {
    border-color: var(--primary-color);
}

.location-dropdown:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.upload-container {
    width: 100%;
    margin-bottom: 20px;
}

.image-upload {
    padding: 12px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.image-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(66, 133, 244, 0.05);
}

.image-upload i {
    margin-right: 8px;
    color: var(--primary-color);
}

.preview-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.preview-image {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.file-input {
    display: none;
}

.upload-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.upload-actions .option-button {
    flex: 1;
}

.submit-container {
    padding: 16px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: white;
}

.submit-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.submit-button:hover:not(:disabled) {
    opacity: 0.9;
}

.summary-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.summary-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--dark-color);
}

.summary-item {
    display: flex;
    margin-bottom: 8px;
}

.summary-label {
    font-weight: 500;
    width: 100px;
    color: var(--gray-color);
}

.summary-value {
    font-weight: 600;
    flex-grow: 1;
}

.login-prompt {
    text-align: center;
    margin: 20px 0;
}

.login-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-button:hover {
    opacity: 0.9;
}


/* 스크롤 스타일 */

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* 텍스트 영역에서 줄바꿈 유지 */

textarea.form-input {
    white-space: pre-wrap;
    line-height: 1.5;
}

.summary-value {
    white-space: pre-wrap;
    line-height: 1.5;
}


/* 반응형 스타일 */

@media (max-width: 480px) {
    .chat-inquiry-page {
        max-width: 100%;
        padding: 0;
    }
    .chat-container {
        border-radius: 0;
        margin-top: 0;
        height: 100vh;
    }
    .option-button {
        font-size: 13px;
        padding: 8px 12px;
    }
}