@charset "UTF-8";
/*
 * ================================================================
 * 伊藤農園 チャットウィジェット スタイル
 * ================================================================
 * index.html の <style> ブロックと同一内容です。
 * インラインで持たせる場合はこのファイルは不要です（どちらか一方でOK）。
 *
 * futureshop など既存サイトへの設置を前提に、以下を徹底しています。
 *   1. セレクタは必ず #ino-chat-widget 配下に限定
 *   2. :root 変数・要素セレクタなどグローバルな定義は一切なし
 *   3. @keyframes 名も ino-chat- プレフィックス付き
 *   4. rem を使わず px 指定（サイト側の html { font-size } の影響を受けない）
 * ================================================================
 */

/* ===== ルート要素 ===== */
#ino-chat-widget {
    position: fixed !important;
    bottom: 20px;
    left: 20px;
    z-index: 2147483647 !important;
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif !important;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    color: #ffffff;
}

/* ===== 配下要素のリセット（サイト側CSSの流入を遮断する） ===== */
#ino-chat-widget *,
#ino-chat-widget *::before,
#ino-chat-widget *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    letter-spacing: normal;
    word-spacing: normal;
    text-align: left;
    text-decoration: none;
    text-indent: 0;
    text-shadow: none;
    text-transform: none;
    color: #fff;
    background-color: transparent;
    background-image: none;
    border-radius: 0;
    box-shadow: none;
    float: none;
    list-style: none;
    vertical-align: baseline;
}

/* フォーム部品はサイト側のテーマ装飾を無効化する */
#ino-chat-widget button,
#ino-chat-widget input,
#ino-chat-widget textarea {
    appearance: none;
    -webkit-appearance: none;
    -webkit-border-radius: 0;
    -webkit-tap-highlight-color: transparent;
}

/* ===== ランチャーボタン ===== */
#ino-chat-widget .ino-chat-launcher {
    background-color: #F39C12;
    color: #FFFFFF;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.2s, background-color 0.2s;
    line-height: normal;
}

#ino-chat-widget .ino-chat-launcher:hover {
    background-color: #E67E22;
    transform: translateY(-2px);
}

#ino-chat-widget .ino-chat-launcher svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
}

#ino-chat-widget .ino-chat-launcher.ino-is-hidden {
    display: none !important;
}

/* ===== チャットウィンドウ ===== */
#ino-chat-widget .ino-chat-window {
    width: 350px;
    height: 500px;
    max-height: 80vh;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 0;
    transform-origin: bottom left;
    transition: opacity 0.3s, transform 0.3s;
}

#ino-chat-widget .ino-chat-window.ino-is-hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* ===== ヘッダー ===== */
#ino-chat-widget .ino-chat-header {
    background-color: #F39C12;
    color: #FFFFFF;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
}

#ino-chat-widget .ino-chat-title {
    font-weight: 700;
    font-size: 16px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

#ino-chat-widget .ino-chat-close {
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
}

#ino-chat-widget .ino-chat-close:hover {
    opacity: 0.8;
}

/* ===== メッセージ表示エリア ===== */
#ino-chat-widget .ino-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    /* ↑Flexboxの子要素でスクロールを有効にするための必須設定 */
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #F5F5F5;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

#ino-chat-widget .ino-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#ino-chat-widget .ino-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#ino-chat-widget .ino-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

#ino-chat-widget .ino-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ===== 吹き出し ===== */
#ino-chat-widget .ino-chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    animation: ino-chat-fade-in 0.3s ease;
}

#ino-chat-widget .ino-chat-msg a {
    color: #F39C12;
    text-decoration: underline;
    word-break: break-all;
}

@keyframes ino-chat-fade-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#ino-chat-widget .ino-chat-msg.ino-is-bot {
    background-color: #FFFFFF;
    color: #333333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#ino-chat-widget .ino-chat-msg.ino-is-user {
    background-color: #F39C12;
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* ===== 選択肢ボタン ===== */
#ino-chat-widget .ino-chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

#ino-chat-widget .ino-chat-option-btn {
    background-color: #FFFFFF;
    border: 1px solid #F39C12;
    color: #F39C12;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1.3;
    white-space: normal;
    text-align: left;
    word-break: break-word;
    max-width: 100%;
}

#ino-chat-widget .ino-chat-option-btn:hover {
    background-color: #F39C12;
    color: #FFFFFF;
}

/* ===== フッター ===== */
#ino-chat-widget .ino-chat-input-area {
    padding: 0;
    display: flex;
    background-color: #FFFFFF;
    align-items: center;
    flex: 0 0 auto;
}

#ino-chat-widget .ino-chat-open-form-btn {
    width: 100%;
    border: none;
    border-top: 1px solid #E0E0E0;
    background: #FFFFFF;
    color: #F39C12;
    padding: 15px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#ino-chat-widget .ino-chat-open-form-btn .ino-chat-icon {
    font-size: 17px;
}

#ino-chat-widget .ino-chat-footer-note {
    font-size: 11px;
    color: #999999;
    text-align: center;
    padding: 4px;
    background: #FFFFFF;
    flex: 0 0 auto;
}

/* ===== 入力中インジケーター ===== */
#ino-chat-widget .ino-chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #FFFFFF;
    border-radius: 18px;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#ino-chat-widget .ino-chat-typing-dot {
    width: 6px;
    height: 6px;
    background: #cccccc;
    border-radius: 50%;
    animation: ino-chat-typing 1.4s infinite ease-in-out both;
}

#ino-chat-widget .ino-chat-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

#ino-chat-widget .ino-chat-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes ino-chat-typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* ===== おすすめ商品 iframe ===== */
#ino-chat-widget .ino-chat-recommend {
    width: 100%;
}

#ino-chat-widget .ino-chat-recommend iframe {
    width: 100%;
    height: 280px;
    border: none;
    border-radius: 8px;
    display: block;
}

/* ===== 商品検索 ===== */
#ino-chat-widget .ino-chat-search {
    width: 100%;
}

#ino-chat-widget .ino-chat-search-form {
    display: flex;
    gap: 6px;
    align-items: stretch;
    width: 100%;
}

#ino-chat-widget .ino-chat-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #333333;
    font-size: 14px;
}

#ino-chat-widget .ino-chat-search-input:focus {
    border-color: #F39C12;
    outline: none;
}

#ino-chat-widget .ino-chat-search-btn {
    flex: 0 0 auto;
    width: 42px;
    border: none;
    border-radius: 6px;
    background-color: #F39C12;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ino-chat-widget .ino-chat-search-btn:hover {
    background-color: #E67E22;
}

/* ===== お問い合わせフォーム ===== */
#ino-chat-widget .ino-chat-form-container {
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    height: calc(100% - 110px);
    background: #FFFFFF;
    z-index: 10;
    padding: 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

#ino-chat-widget .ino-chat-form-container.ino-is-hidden {
    display: none !important;
}

#ino-chat-widget .ino-chat-form-title {
    text-align: center;
    color: #F39C12;
    margin-bottom: 10px;
    font-size: 17px;
    font-weight: 700;
}

#ino-chat-widget .ino-chat-form-desc {
    font-size: 13px;
    color: #666666;
    margin-bottom: 15px;
    text-align: center;
}

#ino-chat-widget .ino-chat-form-group {
    margin-bottom: 12px;
}

#ino-chat-widget .ino-chat-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #333333;
}

#ino-chat-widget .ino-chat-required {
    color: #E74C3C;
    font-weight: 700;
}

#ino-chat-widget .ino-chat-optional {
    font-size: 10px;
    color: #666666;
    font-weight: 400;
}

#ino-chat-widget .ino-chat-form-group input,
#ino-chat-widget .ino-chat-form-group select,
#ino-chat-widget .ino-chat-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 15px;
    background: #FFFFFF;
    color: #333333;
}

#ino-chat-widget .ino-chat-form-group select {
    appearance: auto;
    -webkit-appearance: menulist;
}

#ino-chat-widget .ino-chat-form-group textarea {
    height: 80px;
    resize: vertical;
}

#ino-chat-widget .ino-chat-form-group input:focus,
#ino-chat-widget .ino-chat-form-group select:focus,
#ino-chat-widget .ino-chat-form-group textarea:focus {
    border-color: #F39C12;
    outline: none;
}

#ino-chat-widget .ino-chat-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#ino-chat-widget .ino-chat-btn-submit,
#ino-chat-widget .ino-chat-btn-cancel {
    flex: 1 1 0;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

#ino-chat-widget .ino-chat-btn-submit {
    background-color: #F39C12;
    color: #FFFFFF;
}

#ino-chat-widget .ino-chat-btn-submit:hover {
    background-color: #E67E22;
}

#ino-chat-widget .ino-chat-btn-cancel {
    background-color: #eeeeee;
    color: #333333;
}

#ino-chat-widget .ino-chat-btn-cancel:hover {
    background-color: #dddddd;
}

/* ===== ファイル添付（ドラッグ＆ドロップ） ===== */
#ino-chat-widget .ino-chat-dropzone {
    border: 2px dashed #E0E0E0;
    border-radius: 6px;
    background: #FAFAFA;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

#ino-chat-widget .ino-chat-dropzone:hover {
    border-color: #F39C12;
    background: #FFFBF3;
}

#ino-chat-widget .ino-chat-dropzone.ino-is-dragover {
    border-color: #F39C12;
    background: #FFF3E0;
}

#ino-chat-widget .ino-chat-dropzone.ino-is-error {
    border-color: #E74C3C;
    background: #FFF6F5;
}

#ino-chat-widget .ino-chat-dropzone input[type="file"] {
    display: none;
}

#ino-chat-widget .ino-chat-dropzone__icon {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 4px;
}

#ino-chat-widget .ino-chat-dropzone__text {
    font-size: 13px;
    font-weight: 700;
    color: #666666;
}

#ino-chat-widget .ino-chat-dropzone__sub {
    font-size: 11px;
    color: #999999;
    margin-top: 3px;
    line-height: 1.5;
    font-weight: 400;
}

/* ===== 添付ファイル一覧 ===== */
#ino-chat-widget .ino-chat-file-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#ino-chat-widget .ino-chat-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #EEEEEE;
    border-radius: 6px;
    background: #FFFFFF;
    padding: 6px 8px;
}

#ino-chat-widget .ino-chat-file-item__thumb {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 4px;
    background: #F2F2F2;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #999999;
    overflow: hidden;
}

#ino-chat-widget .ino-chat-file-item__info {
    flex: 1 1 auto;
    min-width: 0;
}

#ino-chat-widget .ino-chat-file-item__name {
    font-size: 12px;
    color: #333333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ino-chat-widget .ino-chat-file-item__size {
    font-size: 10px;
    color: #999999;
    margin-top: 2px;
}

#ino-chat-widget .ino-chat-file-item__remove {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #F0F0F0;
    color: #777777;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

#ino-chat-widget .ino-chat-file-item__remove:hover {
    background: #E74C3C;
    color: #FFFFFF;
}

#ino-chat-widget .ino-chat-file-error {
    display: none;
    font-size: 11px;
    color: #E74C3C;
    margin-top: 6px;
    line-height: 1.5;
    white-space: pre-line;
}

/* ===== レスポンシブ ===== */
@media (max-width: 480px) {
    #ino-chat-widget {
        bottom: 10px;
        left: 10px;
    }

    #ino-chat-widget .ino-chat-launcher {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }

    #ino-chat-widget .ino-chat-launcher-text {
        display: none;
    }

    #ino-chat-widget .ino-chat-window {
        width: calc(100vw - 20px);
        height: 600px;
        bottom: 70px;
    }
}
