/**
 * Edit History Styles
 * SparkSheets - 編集履歴モーダル用CSS
 * 2025/12/22 作成
 */

/* ========================================
   History Container
   ======================================== */
.history-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ========================================
   History Section
   ======================================== */
.history-section {
    /* Base section */
}

.history-section--bordered {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.history-section-title {
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.history-section-title svg,
.history-section-title i {
    width: 16px;
    height: 16px;
}

/* ========================================
   History Empty State
   ======================================== */
.history-empty {
    color: var(--text-muted-color);
    font-size: 13px;
    padding: 16px;
    background: var(--secondary-bg);
    border-radius: 8px;
    text-align: left;
}

.history-empty p {
    margin: 0;
}

.history-empty p + p {
    margin-top: 8px;
    font-size: 11px;
}

/* Empty state with action button */
.history-empty--with-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.history-empty-action {
    margin-top: 16px;
}

/* ========================================
   History List
   ======================================== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========================================
   History Item
   ======================================== */
.history-item {
    padding: 10px 12px;
    background: var(--secondary-bg);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-text {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-text--bold {
    font-weight: 500;
}

.history-item-time {
    font-size: 11px;
    color: var(--text-muted-color);
    margin-top: 2px;
}

/* ========================================
   History Item Actions
   ======================================== */
.history-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* ========================================
   History Buttons
   ======================================== */
.history-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.history-btn:hover {
    opacity: 0.85;
}

.history-btn svg,
.history-btn i {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.history-btn--secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.history-btn--primary {
    background: var(--primary-color);
    color: white;
}

.history-btn--success {
    background: #28a745;
    color: white;
}

.history-btn--danger {
    background: #dc3545;
    color: white;
}

/* Larger button variant */
.history-btn--lg {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 5px;
}

.history-btn--lg svg,
.history-btn--lg i {
    width: 14px;
    height: 14px;
}

/* Medium button variant */
.history-btn--md {
    padding: 6px 12px;
    border-radius: 5px;
}

/* ========================================
   History Actions Row
   ======================================== */
.history-actions-row {
    margin-bottom: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* .history-actions-row--center removed - button now inside history-empty */

/* ========================================
   History More Link
   ======================================== */
.history-more-link {
    margin-top: 12px;
    text-align: left;
}

.history-more-link a {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.history-more-link a:hover {
    text-decoration: underline;
}

.history-more-link svg,
.history-more-link i {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

/* ========================================
   Login Prompt
   ======================================== */
.history-login-prompt {
    color: var(--text-muted-color);
    font-size: 13px;
    padding: 16px;
    background: var(--secondary-bg);
    border-radius: 8px;
    text-align: left;
}

.history-login-prompt p {
    margin: 0;
}

.history-login-prompt .history-btn {
    margin-top: 12px;
}

/* ========================================
   Dark Mode
   ======================================== */
body.dark-mode .history-item {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .history-empty,
body.dark-mode .history-login-prompt {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .history-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
}
