.wp-gpt-bot-container {
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wp-gpt-bot-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background-color: #f9f9f9;
}

.wp-gpt-bot-message {
    margin: 10px;
    padding: 15px;
    border-radius: 10px;
    max-width: 85%;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.wp-gpt-bot-message.bot {
    background-color: var(--bot-background-color, #e9ecef);
    margin-right: auto;
    color: #333;
}

.wp-gpt-bot-message.user {
    background-color: #007bff;
    color: white;
    margin-left: auto;
}

/* Markdown要素のスタイル */
.wp-gpt-bot-message p {
    margin: 0 0 1em;
}

.wp-gpt-bot-message p:last-child {
    margin-bottom: 0;
}

.wp-gpt-bot-message strong {
    font-weight: 600;
}

.wp-gpt-bot-message ul {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.wp-gpt-bot-message li {
    margin: 0.3em 0;
    line-height: 1.5;
}

/* モバイル対応 */
@media screen and (max-width: 480px) {
    .wp-gpt-bot-message {
        max-width: 90%;
        padding: 12px;
        font-size: 0.95em;
    }

    .wp-gpt-bot-message ul {
        padding-left: 1.2em;
    }
}

.wp-gpt-bot-input {
    display: flex;
    padding: 15px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
}

#wp-gpt-bot-message {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 16px;
}

#wp-gpt-bot-send {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

#wp-gpt-bot-send:hover {
    background-color: #0056b3;
}

.wp-gpt-bot-typing {
    padding: 10px;
    color: #666;
    font-style: italic;
}

/* レスポンシブデザイン */
@media (max-width: 600px) {
    .wp-gpt-bot-container {
        margin: 10px;
        border-radius: 0;
    }
    
    .wp-gpt-bot-messages {
        height: 300px;
    }
    
    .wp-gpt-bot-message {
        max-width: 90%;
    }
} 

.wp-gpt-bot-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 400px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
}

.wp-gpt-bot-modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
}

.wp-gpt-bot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 10px 10px 0 0;
}

.wp-gpt-bot-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.wp-gpt-bot-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
    z-index: 1000000;
}

.wp-gpt-bot-modal-close:hover {
    color: #333;
}

.wp-gpt-bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    margin: 10px 0;
    background-color: var(--chat-background-color);
}

.wp-gpt-bot-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 10px 10px;
}

.wp-gpt-bot-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.wp-gpt-bot-input button {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.wp-gpt-bot-modal-button {
    position: fixed;
    z-index: 999998;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

.modal-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.modal-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.modal-position-top-right {
    top: 20px;
    right: 20px;
}

.modal-position-top-left {
    top: 20px;
    left: 20px;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .wp-gpt-bot-modal {
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        margin: 20px;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 10px;
    }

    .wp-gpt-bot-modal-content {
        border-radius: 10px;
    }

    .wp-gpt-bot-modal-header {
        border-radius: 10px 10px 0 0;
    }

    .wp-gpt-bot-input {
        border-radius: 0 0 10px 10px;
    }
}

.preview-message.bot {
    margin-right: auto;
    background-color: #e9ecef;
    color: #333;
}

.preview-message.user {
    background: #007bff;
    color: white;
    margin-left: auto;
}

/* インラインスタイルを優先するために!importantを追加 */
.wp-gpt-bot-message.bot[style*="background-color"] {
    background-color: var(--bot-background-color) !important;
}