.text-display-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin: 5px 0;
    min-height: 50px;
    max-height: 200px;
    overflow-y: auto;
}

.text-input-box {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    resize: vertical;
    min-height: 38px;
}

.section-header {
    font-weight: bold;
    margin: 5px 0;
    color: #495057;
}

.text-muted {
    color: #6c757d;
    font-size: 0.875em;
    font-weight: normal;
}

#responseContainer {
    margin-top: 5px;
}

.typing-indicator {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #6c757d;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.selected-text-container {
    margin-bottom: 0;
    border-bottom: none;
}

.command-input-container {
    margin-top: 0;
    border-top: none;
}

.ai-assistant-modal {
    position: fixed;
    z-index: 999999;
    right: 0;
    top: 0;
    width: 50vw;
    height: 100vh;
    background: none;
    display: none;
    overflow-y: auto;
    pointer-events: none;
}

.ai-assistant-modal-content {
    pointer-events: auto;
    background-color: #fefefe;
    margin: 2vh 0;
    padding: 0;
    width: calc(100% - 2rem);
    min-width: 300px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 96vh;
}

.ai-assistant-modal-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 70px;
}

.button-container {
    margin-top: 10px;
    text-align: right;
}

.button-container button {
    margin-left: 10px;
}

.ai-assistant-modal .button-container {
    position: absolute;
    width: calc(100% - 2px);
    left: 1px;
    border-radius: 0 0 3px 3px;
    bottom: 1px;
}

.command-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin: 5px 0;
}

.command-input-group .text-input-box {
    flex: 1;
    margin: 0;
}

.command-input-group .command-button {
    white-space: nowrap;
    height: 38px;
    margin-bottom: 1px;
}

/* コマンドパレット */
.command-palette {
    position: fixed;
    right: 0;
    top: 0;
    width: 50vw;
    height: 100vh;
    background: none;
    display: none;
    padding-right: 2rem;
    z-index: 200000;
    overflow: hidden;
}

.command-palette.show {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.command-palette-content {
    background-color: var(--bs-body-bg);
    margin: 2vh 0;
    padding: 0;
    width: 100%;
    min-width: 300px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 96vh;
}

.command-palette-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bs-border-color);
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.command-palette .close-button {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

/* ダークモード対応 */
[data-bs-theme="dark"] .command-palette-content {
    background-color: var(--bs-dark);
}

[data-bs-theme="dark"] .command-palette-header {
    background-color: var(--bs-gray-800);
    border-bottom-color: var(--bs-border-color);
}

/* コマンドパレットのボタン */
.command-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding: 16px;
    border-top: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
}

/* ダークモード対応 */
[data-bs-theme="dark"] .button-container {
    background: var(--bs-dark);
}

.ai-checker-modal .button-container {
    margin-top: 10px;
    text-align: right;
}
  