/* 카카오톡 스타일 채팅 UI */
body {
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 헤더 스타일 */
.chat-header {
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.back-btn {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    margin-right: 15px;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: rgba(0,0,0,0.1);
    color: #333;
}

.chat-info h5 {
    color: #333;
    font-weight: 600;
    margin: 0;
}

.chat-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 채팅 컨테이너 */
.chat-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    position: relative;
}

/* 채팅 메시지 영역 */
.chat-messages {
    padding: 20px 20px 120px 20px; /* 하단에 120px 패딩 추가로 입력창과 겹치지 않게 */
    min-height: calc(100vh - 160px);
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    background: #f5f5f5;
}

/* 메시지 컨테이너 */
.message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-end;
}

.message.bot-message {
    justify-content: flex-start;
}

.message.user-message {
    justify-content: flex-end;
}

/* 메시지 아바타 */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-right: 10px;
}

.user-message .message-avatar {
    background: #fee500;
    color: #333;
    margin-left: 10px;
}

/* 메시지 콘텐츠 */
.message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.user-message .message-content {
    align-items: flex-end;
}

.bot-message .message-content {
    align-items: flex-start;
}

/* 메시지 버블 */
.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.bot-message .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

.user-message .message-bubble {
    background: #fee500;
    color: #333;
    border-bottom-right-radius: 4px;
}

/* 메시지 시간 */
.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

/* 채팅 입력 컨테이너 */
.chat-input-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: white;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* 채팅 폼 */
.chat-form {
    width: 100%;
}

.chat-form .input-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-input {
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 25px 0 0 25px !important;
}

.chat-input:focus {
    box-shadow: none;
    border: none;
    outline: none;
}

.chat-send-btn {
    border-radius: 0 25px 25px 0 !important;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    border: none;
    color: #333;
}

.chat-send-btn:hover {
    background: linear-gradient(135deg, #ffd700 0%, #fee500 100%);
    color: #333;
}

/* 질문 컨테이너 */
.chat-question-container {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 8px 0;
}

.chat-question-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.3;
}

/* 다크모드 지원 */
body.dark-mode .chat-question-container {
    background: #2d3748;
    border: 1px solid #4a5568;
}

body.dark-mode .chat-question-text {
    color: #e2e8f0;
}

/* 채팅 옵션 버튼들 */
.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.chat-option-btn {
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    border: 2px solid #fee500;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chat-option-btn:hover {
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(254, 229, 0, 0.3);
    border-color: #ffd700;
}

.chat-option-btn.selected {
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%) !important;
    color: #333 !important;
    transform: none !important;
    cursor: default !important;
    box-shadow: 0 2px 8px rgba(254, 229, 0, 0.3);
    border-color: #ffd700 !important;
}

.chat-option-btn:disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* 메시지 옵션 컨테이너 */
.message-options {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 15px;
    margin-top: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 100%;
}

/* 체크박스 그룹 */
.chat-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-checkbox-group .form-check {
    background: rgba(254, 229, 0, 0.1);
    border-radius: 8px;
    padding: 8px 8px 8px 12px;
    margin: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
}

.chat-checkbox-group .form-check:hover {
    background: rgba(254, 229, 0, 0.2);
}

.chat-checkbox-group .form-check:has(.form-check-input:checked) {
    background-color: rgba(254, 229, 0, 0.4);
}

.chat-checkbox-group .form-check-input {
    margin-top: 0.2em;
    margin-left: 0;
    margin-right: 6px;
    flex-shrink: 0;
    transform: scale(1.1);
    width: 18px;
    height: 18px;
    accent-color: #fee500;
    background-color: rgba(254, 229, 0, 0.1);
    border-color: #fee500;
}

.chat-checkbox-group .form-check-label {
    margin-left: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.2;
    flex: 1;
}

/* 개인정보 동의 체크박스 추가 스타일 */
.chat-checkbox-group .form-check {
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.chat-checkbox-group .form-check:hover {
    background: rgba(254, 229, 0, 0.1);
    border-color: rgba(254, 229, 0, 0.3);
}

/* 필수/선택 표시를 위한 공통 스타일 */
.privacy-required:after,
.privacy-optional:after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    color: white;
}

/* 필수 항목 표시 */
.privacy-required:after {
    content: '필수';
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* 선택 항목 표시 */
.privacy-optional:after {
    content: '선택';
    background: linear-gradient(135deg, #6c757d, #5a6268);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* 다크모드 지원 */
body.dark-mode .chat-checkbox-group .form-check {
    background: rgba(45, 55, 72, 0.8);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .chat-checkbox-group .form-check:hover {
    background: rgba(254, 229, 0, 0.15);
    border-color: rgba(254, 229, 0, 0.4);
}

/* 체크된 상태 스타일 (카카오 스타일) */
.chat-checkbox-group .form-check-input:checked,
.chat-radio-group .form-check-input:checked {
    background-color: #FEE500;
    border-color: #FEE500;
}

.chat-checkbox-group .form-check-input:focus,
.chat-radio-group .form-check-input:focus {
    border-color: #FEE500;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(254, 229, 0, 0.5);
}

.chat-checkbox-group .form-check-input[type=checkbox]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.chat-radio-group .form-check-input[type=radio]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23000'/%3e%3c/svg%3e");
}

.chat-checkbox-group .form-check-input:checked + .form-check-label,
.chat-radio-group .form-check-input:checked + .form-check-label {
    color: #333;
    font-weight: 600;
}

.chat-checkbox-group .form-check-input:checked + .privacy-required:after {
    background: linear-gradient(135deg, #28a745, #20c997);
    content: '완료';
}

.chat-checkbox-group .form-check-input:checked + .privacy-optional:after {
    background: linear-gradient(135deg, #17a2b8, #138496);
    content: '완료';
}

/* 전체 선택 버튼 스타일 */
.select-all-btn, .select-required-btn {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.select-all-btn {
    background: rgba(108, 117, 125, 0.1);
    border-color: #6c757d;
    color: #6c757d;
}

.select-all-btn:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.select-required-btn {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #856404;
}

.select-required-btn:hover {
    background: #ffc107;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

/* 다크모드에서의 전체 선택 버튼 */
body.dark-mode .select-all-btn {
    background: rgba(173, 181, 189, 0.2);
    border-color: #adb5bd;
    color: #adb5bd;
}

body.dark-mode .select-all-btn:hover {
    background: #adb5bd;
    color: #212529;
}

body.dark-mode .select-required-btn {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
    color: #ffc107;
}

body.dark-mode .select-required-btn:hover {
    background: #ffc107;
    color: #212529;
}

/* 개인정보 약관 링크 스타일 (카카오 스타일) */
.privacy-link {
    color: #856404; /* 카카오 텍스트 브라운 */
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(255, 221, 0, 0.2); /* 카카오 옐로우 배경 */
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid rgba(255, 221, 0, 0.4);
}

.privacy-link:hover {
    background: #FEE500; /* 카카오 옐로우 */
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.privacy-link:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(254, 229, 0, 0.5);
}

/* 다크모드에서의 개인정보 약관 링크 */
body.dark-mode .privacy-link {
    color: #FEE500;
    background: rgba(254, 229, 0, 0.15);
    border-color: rgba(254, 229, 0, 0.3);
}

body.dark-mode .privacy-link:hover {
    background: #FEE500;
    color: #1e293b;
}

/* 라디오 그룹 */
.chat-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-radio-group .form-check {
    background: rgba(254, 229, 0, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chat-radio-group .form-check:hover {
    background: rgba(254, 229, 0, 0.1);
}

.chat-radio-group .form-check-input {
    margin-top: 0.25em;
}

.chat-radio-group .form-check-label {
    margin-left: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* 확인 버튼 */
.chat-confirm-btn {
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    border: none;
    border-radius: 15px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    align-self: center;
    margin-top: 10px;
}

.chat-confirm-btn:hover {
    background: linear-gradient(135deg, #ffd700 0%, #fee500 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(254, 229, 0, 0.3);
    color: #333;
}

.chat-confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 채팅 이미지 스타일 */
.message-image-container {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-image {
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    object-fit: cover;
    background: #f8f9fa;
    loading: lazy;
}

.chat-image.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-image.clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.chat-image.expanded {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 99999 !important;
    max-width: 85vw !important;
    max-height: 85vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
    background: white !important;
    padding: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.chat-image.expanded::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: -1;
    backdrop-filter: blur(5px);
}

.image-caption {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    max-width: 100%;
    font-style: italic;
}

/* 이미지 로딩 상태 */
.chat-image[src=""] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 반응형 이미지 */
@media (max-width: 768px) {
    .chat-image {
        max-width: 400px !important;
        max-height: 500px !important;
    }
    
    .chat-image.expanded {
        max-width: 90vw !important;
        max-height: 80vh !important;
        transform: translate(-50%, -50%) !important;
        padding: 8px !important;
    }
    
    .image-caption {
        font-size: 11px;
    }
}

/* 더 작은 화면 (작은 모바일) */
@media (max-width: 480px) {
    .chat-image.expanded {
        max-width: 95vw !important;
        max-height: 75vh !important;
        padding: 5px !important;
    }
}

/* 타이핑 효과 */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    max-width: fit-content;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    animation: typingAnimation 1.5s infinite;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.message.typing-message {
    opacity: 1;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .chat-messages {
        min-height: calc(100vh - 140px);
        max-height: calc(100vh - 140px);
        padding: 15px;
    }
    
    .message-content {
        max-width: 80%;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .message-bubble {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .chat-option-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .typing-dot {
        width: 6px;
        height: 6px;
    }
}

.chat-links {
    margin-left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-links a {
    color: #333;
    font-size: 12px;
    transition: color 0.3s;
    text-decoration: none;
    font-weight: 500;
}

.chat-links a:hover {
    color: #000;
    text-decoration: underline;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00c851;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 채팅 컨테이너 */
.chat-container {
    min-height: 100vh;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.chat-messages {
    padding: 20px 15px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* 메시지 스타일 */
.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.bot-message {
    align-items: flex-start;
}

.user-message {
    align-items: flex-end;
}

.message-content {
    max-width: 70%;
}

.message-bubble {
    background-color: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    line-height: 1.4;
    word-wrap: break-word;
}

.bot-message .message-bubble {
    border-bottom-left-radius: 4px;
    background-color: white;
}

.user-message .message-bubble {
    border-bottom-right-radius: 4px;
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    color: #333;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    text-align: center;
}

/* 빠른 선택 버튼 */
.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-btn {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quick-btn:hover {
    background-color: #fee500;
    border-color: #fee500;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.quick-btn i {
    font-size: 12px;
}

/* 입력 영역 */
.chat-input-area {
    background-color: white;
    border-top: 1px solid #e0e0e0;
    padding: 15px 0;
    position: sticky;
    bottom: 0;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.chat-form {
    padding: 0 15px;
}

.input-group {
    background-color: #f8f9fa;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#messageInput {
    border: none;
    background: transparent;
    padding: 12px 20px;
    font-size: 16px;
}

#messageInput:focus {
    box-shadow: none;
    outline: none;
}

.send-btn {
    border: none;
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    color: #333;
    padding: 12px 20px;
    border-radius: 0 25px 25px 0;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: linear-gradient(135deg, #ffd700 0%, #fee500 100%);
    color: #333;
    transform: scale(1.05);
}

/* 모달 스타일 */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    color: #333;
    font-weight: 600;
}

.btn-close {
    filter: invert(1);
}

.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #fee500;
    box-shadow: 0 0 0 0.2rem rgba(254, 229, 0, 0.25);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    /* 모바일에서는 전체 화면 사용 */
    .chat-container {
        max-width: none;
        margin: 0;
        box-shadow: none;
        padding-bottom: 100px; /* 입력창 높이보다 더 큰 패딩으로 충분한 공간 확보 */
    }
    
    .chat-messages {
        padding-bottom: 150px; /* 모바일에서 더 많은 하단 패딩 */
    }
    
    .chat-header {
        max-width: none;
        margin: 0;
        width: 100%;
    }
    
    .chat-input-area {
        max-width: none;
        margin: 0;
        width: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: white;
        border-top: 1px solid #e0e0e0;
        padding: 10px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        /* iOS Safari 안전 영역 지원 */
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }
    
    .chat-messages {
        padding: 0 10px;
        padding-bottom: 80px; /* 하단 입력창 공간 확보 */
        height: calc(100vh - 120px); /* 헤더와 입력창 높이를 뺀 나머지 */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* iOS에서 부드러운 스크롤 */
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .quick-options {
        flex-direction: column;
    }
    
    .quick-btn {
        justify-content: center;
    }
    
    .chat-form {
        padding: 0 10px;
    }
    
    .chat-links {
        margin-left: 10px;
        gap: 8px;
    }
    
    .chat-links a {
        font-size: 11px;
    }
    
    /* 모바일에서 입력 필드 포커스 시 줌 방지 */
    #messageInput {
        font-size: 16px; /* iOS에서 자동 줌 방지 */
    }
    
    /* 모바일에서 터치 영역 확대 */
    .send-btn {
        min-height: 44px; /* 터치 타겟 최소 크기 */
        min-width: 44px;
    }
}

/* 타이핑 애니메이션 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background-color: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 스크롤바 스타일 */
.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 동적 폼 스타일 */
.dynamic-form {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dynamic-form .form-group {
    margin-bottom: 20px;
}

.dynamic-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.dynamic-form .form-label.required::after {
    content: ' *';
    color: #dc3545;
}

.dynamic-form .form-control,
.dynamic-form .form-select,
.dynamic-form textarea {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dynamic-form .form-control:focus,
.dynamic-form .form-select:focus,
.dynamic-form textarea:focus {
    border-color: #fee500;
    box-shadow: 0 0 0 0.2rem rgba(254, 229, 0, 0.25);
    outline: none;
}

.dynamic-form .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.dynamic-form .invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.dynamic-form .btn {
    border-radius: 10px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dynamic-form .btn-primary {
    background: linear-gradient(135deg, #fee500 0%, #ffd700 100%);
    border: none;
    color: #333;
}

.dynamic-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 229, 0, 0.4);
}

.dynamic-form .form-check {
    margin-bottom: 15px;
}

.dynamic-form .form-check-input:checked {
    background-color: #fee500;
    border-color: #fee500;
}

.dynamic-form .checkbox-group {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    background-color: #f8f9fa;
}

.dynamic-form .checkbox-group .form-check {
    margin-bottom: 10px;
}

.dynamic-form .checkbox-group .form-check:last-child {
    margin-bottom: 0;
}

.dynamic-form .form-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
} 