/* 画像履歴用スタイル */

.image-history {
    padding: 16px;
}

.no-history {
    color: #5f6368;
    text-align: center;
    padding: 32px 16px;
    font-size: 14px;
}

.image-history-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 8px;
}

.image-history-item:hover {
    background-color: #f1f3f4;
}

.history-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

/* 🆕 画像コンテナ（相対位置） */
.history-image-container {
    position: relative;
    width: 80px;
    height: 80px;
}

/* 🆕 フロートボタン（画像の右下） */
.history-float-buttons {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-image-container:hover .history-float-buttons {
    opacity: 1;
}

.history-float-btn {
    padding: 3px 6px;
    font-size: 9px;
    font-weight: 600;
    border: none;
    border-radius: 3px;
    background: rgba(52, 168, 83, 0.9);
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-float-btn:hover {
    background: rgba(52, 168, 83, 1);
}

.clip-btn {
    background: rgba(52, 168, 83, 0.9);
}

.clip-btn:hover {
    background: rgba(52, 168, 83, 1);
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.history-prompt {
    font-size: 14px;
    color: #202124;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    cursor: help;
}

.history-date {
    font-size: 12px;
    color: #5f6368;
}

/* 🆕 トースト通知アニメーション */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* 画像拡大モーダル */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 8px;
}

.image-modal .close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal .close-modal:hover {
    background: #f1f3f4;
}

/* ボタンスタイル */
.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-secondary {
    background: #f1f3f4;
    color: #202124;
}

.btn-secondary:hover {
    background: #e8eaed;
}
