/**
 * Modal - Evolution Manager Style
 */

.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.modal.show {
    display: flex !important;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 440px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.2s ease;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--error);
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--card-border);
    text-align: right;
}

/* History List */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg);
    margin-bottom: 8px;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-item.empty {
    justify-content: center;
    color: var(--text-muted);
    padding: 32px;
    background: transparent;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.875rem;
}

.history-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.history-status {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--success);
    color: white;
    font-weight: 500;
}

/* Clear Button */
.btn-clear {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 8px 16px;
    transition: opacity 0.2s;
}

.btn-clear:hover {
    opacity: 0.7;
}