/* =============================================
   だるまや呉服店 チャットボット - 統合用スタイル
   ============================================= */

:root {
    --chat-navy: #1a1a2e;
    --chat-gold: #d4af37;
    --chat-vermillion: #a92a2a;
    /* 既存HPに合わせたエンジ色 */
    --chat-cream: #f5f0e8;
    --chat-white: #ffffff;
    --chat-text: #2c2c2c;
    --chat-radius: 20px;
}

/* --- トグルボタン --- */
.chat-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--chat-gold);
    color: var(--chat-navy);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle.active {
    background: var(--chat-vermillion);
    color: white;
}

/* --- チャットウィンドウ --- */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    height: 550px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: var(--chat-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- ヘッダー --- */
.chat-header {
    background: var(--chat-navy);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h2 {
    font-size: 1rem;
    margin: 0;
    font-family: serif;
}

/* --- メッセージエリア --- */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #fdfcf9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    display: flex;
    gap: 8px;
    max-width: 85%;
}

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.bot .message-bubble {
    background: #f0ede6;
    color: #333;
}

.message.user .message-bubble {
    background: var(--chat-navy);
    color: white;
}

/* --- クイックアクション --- */
.chat-quick-actions {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: white;
    border-top: 1px solid #eee;
}

.quick-action-btn {
    padding: 5px 12px;
    border-radius: 15px;
    border: 1px solid var(--chat-gold);
    background: transparent;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.quick-action-btn:hover {
    background: var(--chat-gold);
    color: white;
}

/* --- 入力エリア --- */
.chat-input-area {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
}

.chat-send {
    background: var(--chat-gold);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}