.chat-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.chat-widget.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #2A4C76;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.3s ease;
}

.chat-toggle img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.chat-header {
    padding: 15px;
    background: #2A4C76;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-text h3 {
    margin: 0;
    font-size: 16px;
}

.chat-header-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

.chat-close-btn {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.chat-close-btn::before,
.chat-close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: white;
    top: 50%;
    left: 50%;
}

.chat-close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.chat-close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.chat-form {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 14px;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group textarea {
    resize: none;
    height: 100px;
}

.submit-button {
    background: #2A4C76;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.submit-button:hover {
    background: #1a3c66;
}

.success-message {
    display: none;
    padding: 15px;
    background: #4CAF50;
    color: white;
    text-align: center;
    font-size: 14px;
}

/* 모바일 최적화 스타일 */
@media screen and (max-width: 768px) {
    .chat-widget {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        padding-top: 80px;
        border-radius: 0;
        max-height: 100vh;
    }

    .chat-toggle {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .chat-toggle img {
        width: 25px;
        height: 25px;
    }

    .chat-header {
        padding: 12px;
        padding-right: 45px;
    }

    .chat-header img {
        width: 35px;
        height: 35px;
    }

    .chat-form {
        padding: 12px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* 모바일에서 더 큰 폰트 사이즈 */
        padding: 12px;
    }

    .submit-button {
        padding: 15px;
        font-size: 16px;
    }

    /* 모바일에서 키보드가 올라올 때 대응 */
    .chat-widget.active {
        height: 100%;
        max-height: 100vh;
    }

    /* 모바일에서 스크롤이 자연스럽게 되도록 */
    .chat-form {
        -webkit-overflow-scrolling: touch;
    }

    .chat-close-btn {
        display: block;
    }
}

/* 태블릿 최적화 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .chat-widget {
        width: 400px;
        height: 600px;
    }
}

/* 다크 모드 대응 */
@media (prefers-color-scheme: dark) {
    .chat-widget {
        background: #1a1a1a;
    }

    .form-group label {
        color: #fff;
    }

    .form-group input,
    .form-group textarea {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #fff;
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: #888;
    }
} 