/* カスタムチャットダイアログ全体のスタイル */
.custom-chat-dialog {
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: fixed;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* ダイアログタイトルバーのスタイル */
.custom-chat-dialog .ui-dialog-titlebar {
    background: #cdf5b2;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    padding: 10px 16px !important;
    position: relative;
    height: 20px;
}

/* ダイアログタイトルのスタイル */
.custom-chat-dialog .ui-dialog-title {
    font-weight: 600;
    color: #333;
    margin: 0 !important;
    font-size: 14px;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    line-height: 16px; /* 垂直中央揃え */
}

/* 元の閉じるボタンを完全に削除 */
.custom-chat-dialog .ui-dialog-titlebar-close {
    display: none !important;
}

/* ボタンの統一スタイル */
.custom-chat-dialog .custom-chat-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    background-color: #5b5b5b;
    border-radius: 5px;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ボタンのホバーエフェクト */
.custom-chat-dialog .custom-chat-button:hover {
    background-color: #707070;
    transform: translateY(-50%) scale(1.05);
}

/* ボタンのクリックエフェクト */
.custom-chat-dialog .custom-chat-button:active {
    transform: translateY(-50%) scale(0.95);
}

/* 閉じるボタンの位置 */
.custom-chat-close {
    right: 10px;
}

/* 最小化ボタンの位置 */
.custom-chat-minimize {
    right: 40px;
}

/* ボタンアイコンのスタイル */
.custom-chat-icon {
    color: white;
    font-size: 16px;
    line-height: 1;
}

/* ダイアログコンテンツエリアのスタイル */
.custom-chat-dialog .ui-dialog-content {
    padding: 0 !important;
    position: relative;
    border: 0;
    background: none;
    overflow: auto;
}

/* 最小化状態のスタイル */
.custom-chat-minimized {
    width: 240px !important;
    height: 48px !important;
    overflow: hidden;
    z-index: 9999 !important;
}

/* 最小化時にコンテンツを非表示にする */
.custom-chat-minimized .ui-dialog-content {
    display: none !important;
}

/* 最小化時のタイトルバーのスタイル */
.custom-chat-minimized .ui-dialog-titlebar {
    border-radius: 8px;
    border: none;
    cursor: pointer;
}