@keyframes OutputMessageSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes OutputMessageBackgroundFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* 背景オーバーレイ */
#outputMessageBackGround {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    animation: OutputMessageBackgroundFadeIn 0.2s ease-out;
}

/* メッセージボックス */
.outputMessageBox {
    animation: OutputMessageSlideIn 0.3s ease-out;
    background-color: #ffffff;
    margin: 20px;
    width: auto;
    min-width: 300px;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

/* 内側のコンテナ */
.outputMessageInner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* メッセージエリア */
.outputMessageTop {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.6;
    padding-right: 8px;
}

/* スクロールバーのスタイリング */
.outputMessageTop::-webkit-scrollbar {
    width: 8px;
}

.outputMessageTop::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.outputMessageTop::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.outputMessageTop::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* メッセージテキスト */
.outputMessageMsg {
    display: block;
    word-wrap: break-word;
}

/* ボタンエリア */
.outputMessageUnder {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}

/* ボタン */
.output-message-button {
    padding: 10px 24px;
    min-width: 80px;
    height: auto;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.output-message-button:hover {
    background: #f5f5f5;
    border-color: #999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.output-message-button:active {
    background: #e8e8e8;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
}

.output-message-button:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* プライマリボタン（最初のボタン）のスタイル */
.output-message-button:first-child {
    background: #4a90e2;
    color: #ffffff;
    border-color: #4a90e2;
}

.output-message-button:first-child:hover {
    background: #357abd;
    border-color: #357abd;
}

.output-message-button:first-child:active {
    background: #2e6da4;
}

/* メッセージタイプ別のスタイル */
.outputMessageBox.type-success {
    border-left: 4px solid #2ecc71;
}

.outputMessageBox.type-success .outputMessageMsg {
    color: #27ae60;
}

.outputMessageBox.type-error {
    border-left: 4px solid #e74c3c;
}

.outputMessageBox.type-error .outputMessageMsg {
    color: #c0392b;
}

.outputMessageBox.type-warning {
    border-left: 4px solid #f39c12;
}

.outputMessageBox.type-warning .outputMessageMsg {
    color: #e67e22;
}

.outputMessageBox.type-info {
    border-left: 4px solid #3498db;
}

.outputMessageBox.type-info .outputMessageMsg {
    color: #2980b9;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .outputMessageBox {
        min-width: 280px;
        max-width: calc(100% - 40px);
        margin: 20px;
    }

    .outputMessageInner {
        padding: 20px;
        gap: 16px;
    }

    .output-message-button {
        padding: 8px 16px;
        min-width: 70px;
        font-size: 13px;
    }
}
