/* ========================================
   AIチャットボット スタイル
   ======================================== */

/* チャットボットウィジェット */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Noto Sans JP', sans-serif;
}

/* チャットトグルボタン */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.5);
}

/* チャットウィンドウ */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ヘッダー */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* メッセージエリア */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

/* メッセージ */
.chatbot-message {
    display: flex;
    margin-bottom: 15px;
    animation: messageSlideIn 0.4s ease;
}

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

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

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

.chatbot-message-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    margin-right: 10px;
}

.chatbot-message-content {
    max-width: 75%;
}

.chatbot-message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.chatbot-message-bot .chatbot-message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chatbot-message-user .chatbot-message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* 店舗カード */
.chatbot-shop-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: cardSlideIn 0.5s ease;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chatbot-shop-image {
    height: 120px;
    position: relative;
}

.chatbot-shop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
}

.chatbot-shop-content {
    padding: 15px;
}

.chatbot-shop-content h4 {
    margin: 0 0 8px 0;
    color: #667eea;
    font-size: 16px;
    font-weight: 700;
}

.chatbot-shop-rating {
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 8px;
}

.chatbot-shop-rating span {
    color: #333;
    font-weight: 600;
    margin-left: 5px;
}

.chatbot-shop-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.chatbot-shop-actions {
    display: flex;
    gap: 8px;
}

.chatbot-shop-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.chatbot-shop-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chatbot-shop-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbot-shop-btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.chatbot-shop-btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* 入力エリア */
.chatbot-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.chatbot-option-btn {
    padding: 12px 16px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.chatbot-option-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

.chatbot-option-btn:active {
    transform: scale(0.98);
}

/* フッター */
.chatbot-footer {
    padding: 12px 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    border-radius: 0 0 20px 20px;
}

.chatbot-reset-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #f8f9fa;
    color: #666;
}

.chatbot-reset-btn:hover {
    background: #e0e0e0;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 90px;
        right: 20px;
        left: 20px;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

/* アニメーション効果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.chatbot-toggle {
    animation: pulse 2s infinite;
}

.chatbot-toggle:hover {
    animation: none;
}

/* タイピングインジケーター */
.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* コンタクトフォーム */
.chatbot-contact-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #667eea;
}

.chatbot-contact-form h4 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.chatbot-contact-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.chatbot-contact-form input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chatbot-contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.chatbot-contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.contact-note {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.contact-form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.contact-submit-btn,
.contact-cancel-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.contact-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.contact-cancel-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e0e0e0;
}

.contact-cancel-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.contact-submit-btn:active,
.contact-cancel-btn:active {
    transform: scale(0.98);
}
