/* 退職代行チャットボット - スタイルシート */

/* チャットボタン */
.retirement-chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s ease;
    border: none;
}

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

.retirement-chatbot-button svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.retirement-chatbot-button.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 未読バッジ */
.chatbot-unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
}

/* チャットウィンドウ */
.retirement-chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.retirement-chatbot-window.active {
    display: flex;
}

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

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

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

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

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

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

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

/* メッセージバブル */
.chatbot-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

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

.chatbot-message.user .chatbot-message-avatar {
    background: #e2e8f0;
    color: #4a5568;
}

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

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

.chatbot-message.bot .chatbot-message-bubble {
    background: white;
    color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px 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;
    margin-left: auto;
}

.chatbot-message-time {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 4px;
    padding: 0 4px;
}

/* オプションボタン */
.chatbot-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.chatbot-option-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.chatbot-option-btn:hover {
    border-color: #667eea;
    background: #f7fafc;
    color: #667eea;
    transform: translateX(4px);
}

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

/* LINEボタン */
.chatbot-line-button {
    background: #06c755;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.chatbot-line-button:hover {
    background: #05b04c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.chatbot-line-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

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

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e0;
    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);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* 入力エリア */
.chatbot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #667eea;
}

.chatbot-input::placeholder {
    color: #a0aec0;
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-send-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .retirement-chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .retirement-chatbot-button {
        bottom: 15px;
        right: 15px;
    }
}

/* アクセシビリティ */
.chatbot-option-btn:focus,
.chatbot-send-btn:focus,
.chatbot-input:focus,
.chatbot-close:focus,
.retirement-chatbot-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ローディング状態 */
.chatbot-loading {
    pointer-events: none;
    opacity: 0.6;
}
